Making unix act like the rest of the platforms. It now return zero for the

size if the nsIFile is really a directory.


git-svn-id: svn://10.0.0.236/trunk@60214 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dougt%netscape.com
2000-02-09 08:09:35 +00:00
parent a7629baafd
commit 8405fac6f4

View File

@@ -826,8 +826,11 @@ nsLocalFile::GetFileSize(PRInt64 *aFileSize)
NS_ENSURE_ARG_POINTER(aFileSize);
VALIDATE_STAT_CACHE();
/* XXX autoconf for and use stat64 if available */
mLL_II2L(0, (PRUint32)mCachedStat.st_size, *aFileSize);
/* XXX autoconf for and use stat64 if available */
if( S_ISDIR(mCachedStat.st_mode) )
mLL_II2L(0, (PRUint32)0, *aFileSize);
else
mLL_II2L(0, (PRUint32)mCachedStat.st_size, *aFileSize);
return NS_OK;
}