Make implementations consistent across platforms: ensure IsDirectory and IsFile return false even when the file doesn't exist (and they return an nsresult error status). b=187014 r=dougt sr=alecf

git-svn-id: svn://10.0.0.236/trunk@136268 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2003-01-13 23:17:49 +00:00
parent 4305a396ed
commit 2c50ed9f87
2 changed files with 4 additions and 0 deletions

View File

@@ -1291,6 +1291,7 @@ NS_IMETHODIMP
nsLocalFile::IsDirectory(PRBool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = PR_FALSE;
VALIDATE_STAT_CACHE();
*_retval = S_ISDIR(mCachedStat.st_mode);
return NS_OK;
@@ -1300,6 +1301,7 @@ NS_IMETHODIMP
nsLocalFile::IsFile(PRBool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = PR_FALSE;
VALIDATE_STAT_CACHE();
*_retval = S_ISREG(mCachedStat.st_mode);
return NS_OK;