347778 nsLocalFile::MoveTo no longer creates directories when needed on OS X after bug 294584. r=darin

git-svn-id: svn://10.0.0.236/trunk@206753 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mark%moxienet.com
2006-08-07 21:27:09 +00:00
parent 1dc6fbc92b
commit 383394097f
2 changed files with 16 additions and 1 deletions

View File

@@ -599,6 +599,17 @@ NS_IMETHODIMP nsLocalFile::MoveToNative(nsIFile *newParentDir, const nsACString&
if (NS_FAILED(rv))
return rv;
}
else {
PRBool exists;
rv = parentDir->Exists(&exists);
if (NS_FAILED(rv))
return rv;
if (!exists) {
rv = parentDir->Create(nsIFile::DIRECTORY_TYPE, 0777);
if (NS_FAILED(rv))
return rv;
}
}
nsCAutoString destPath;
rv = parentDir->GetNativePath(destPath);