mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
On Windows and Mac, nsIFile.copyTo will fail if the file already exists. Use the .createUnique logic to create a unique name, but then remove it for the copy.
This commit is contained in:
parent
ae3fe7f334
commit
bdb05f2495
@ -22,6 +22,7 @@ function copyToTemporaryFile(f)
|
||||
tmpf = tmpd.clone();
|
||||
tmpf.append("temp.manifest");
|
||||
tmpf.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
|
||||
tmpf.remove(false);
|
||||
|
||||
f.copyTo(tmpd, tmpf.leafName);
|
||||
return tmpf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user