fixed compilation problem in SetTimes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
87948f22dd
commit
246c704fca
@ -899,9 +899,17 @@ bool wxFileName::SetTimes(const wxDateTime *dtCreate,
|
||||
const wxDateTime *dtMod)
|
||||
{
|
||||
#if defined(__UNIX_LIKE__)
|
||||
if ( !dtAccess && !dtMod )
|
||||
{
|
||||
// can't modify the creation time anyhow, don't try
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// if dtAccess or dtMod is not specified, use the other one (which must be
|
||||
// non NULL because of the test above) for both times
|
||||
utimbuf utm;
|
||||
utm.actime = dtAccess ? dtAccess : dtAccess->GetTicks();
|
||||
utm.modtime = dtMod ? dtMod : dtMod->GetTicks();
|
||||
utm.actime = dtAccess ? dtAccess->GetTicks() : dtMod->GetTicks();
|
||||
utm.modtime = dtMod ? dtMod->GetTicks() : dtAccess->GetTicks();
|
||||
if ( utime(GetFullPath(), &utm) == 0 )
|
||||
{
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user