Fixing nsIFile::SetLastModificationDate for Unix.

b = 12368
r = ssu


git-svn-id: svn://10.0.0.236/trunk@64239 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sgehani%netscape.com
2000-03-27 22:04:46 +00:00
parent 1bdb9de7c9
commit a8ccfeed71

View File

@@ -794,9 +794,11 @@ nsLocalFile::SetLastModificationDate(PRInt64 aLastModificationDate)
VALIDATE_STAT_CACHE();
struct utimbuf ut;
ut.actime = mCachedStat.st_atime;
PRInt32 hi, lo;
mLL_L2II(aLastModificationDate, hi, lo);
ut.modtime = (time_t)lo;
// convert PRTime microsecs to unix seconds since the epoch
double dTime;
LL_L2D(dTime, aLastModificationDate);
ut.modtime = (time_t)( (PRUint32)(dTime * 1e-6 + 0.5) );
result = utime(mPath, &ut);
} else {
result = utime(mPath, NULL);