fix for #101527. moveTo() of directories leaves subdirectories behind on win2k.

r=dougt, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@119836 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sspitzer%netscape.com
2002-04-25 18:56:04 +00:00
parent 176c5f891d
commit b67360adf9

View File

@@ -1133,6 +1133,14 @@ nsLocalFile::CopyMove(nsIFile *aParentDir, const char *newName, PRBool followSym
iterator->HasMoreElements(&more);
}
// we've finished moving all the children of this directory
// in the new directory. so now delete the directory
// note, we don't need to do a recursive delete.
// MoveTo() is recursive. At this point,
// we've already moved the children of the current folder
// to the new location. nothing should be left in the folder.
if (move)
rv = Remove(PR_FALSE /* recursive */);
}