diff --git a/mozilla/xpcom/io/nsLocalFileWin.cpp b/mozilla/xpcom/io/nsLocalFileWin.cpp index 721b8ad17ff..b0bfc8130ed 100644 --- a/mozilla/xpcom/io/nsLocalFileWin.cpp +++ b/mozilla/xpcom/io/nsLocalFileWin.cpp @@ -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 */); }