Fixes 165561. r=me, sr=darin, by=pete collins

This commit is contained in:
dougt%netscape.com 2002-08-29 23:11:20 +00:00
Родитель 6ac81f5b3b
Коммит 1c7f0f1c9a
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -709,8 +709,13 @@ nsLocalFile::CopyToNative(nsIFile *newParent, const nsACString &newName)
// we copy the parent here so 'newParent' remains immutable
nsCOMPtr <nsIFile> workParent;
if (NS_FAILED(rv = newParent->Clone(getter_AddRefs(workParent))))
return rv;
if (newParent) {
if (NS_FAILED(rv = newParent->Clone(getter_AddRefs(workParent))))
return rv;
} else {
if (NS_FAILED(rv = GetParent(getter_AddRefs(workParent))))
return rv;
}
// check to see if we are a directory or if we are a file
PRBool isDirectory;