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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user