Avoid opening and trying to reopen in CopyTo, so we work on FAT32 filesystems mounted on Linux (e.g.; 134163, r=dougt, sr=waterson, a=asa).

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120472 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brendan%mozilla.org
2002-05-01 22:50:20 +00:00
parent cb5b4b1b01
commit a978be0193
2 changed files with 110 additions and 107 deletions

View File

@@ -73,7 +73,7 @@
inline nsresult
nsresultForErrno(int err)
{
switch(err) {
switch (err) {
case 0:
return NS_OK;
case ENOENT:
@@ -86,7 +86,9 @@ nsresultForErrno(int err)
#endif /* ENOLINK */
case EEXIST:
return NS_ERROR_FILE_ALREADY_EXISTS;
case EPERM:
case EACCES:
return NS_ERROR_FILE_ACCESS_DENIED;
default:
return NS_ERROR_FAILURE;
}
@@ -127,6 +129,8 @@ protected:
void InvalidateCache() { mHaveCachedStat = PR_FALSE; }
nsresult FillStatCache();
nsresult CreateAndKeepOpen(PRUint32 type, PRIntn flags,
PRUint32 permissions, PRFileDesc **_retval);
};
#endif /* _nsLocalFileUNIX_H_ */