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

size if the nsIFile is really a directory.
This commit is contained in:
dougt@netscape.com
2000-02-09 08:09:35 +00:00
parent 219dff4fe9
commit 69b0947126

View File

@@ -827,6 +827,9 @@ nsLocalFile::GetFileSize(PRInt64 *aFileSize)
VALIDATE_STAT_CACHE();
/* 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;
}