properly remove folders that are overwritten on "save as"

This commit is contained in:
benfry
2005-04-18 23:55:25 +00:00
parent 7da598fb6d
commit 5fcf382107
2 changed files with 8 additions and 8 deletions

View File

@@ -736,6 +736,13 @@ public class Sketch {
}
} catch (IOException e) { }
// if the new folder already exists, then need to remove
// its contents before copying everything over
// (user will have already been warned)
Base.removeDir(newFolder);
// in fact, you can't do this on windows because it tries
// to go into the same folder, but it happens on osx a lot.
// copy the entire contents of the sketch folder
Base.copyDir(folder, newFolder);

View File

@@ -9,6 +9,7 @@ X update the script for the mailing list
save as... bugs
X make sure that the sketch folder still exists when doing any operation
X otherwise editor gets into a weird state
X remove a folder if someone tries to replace it via "save as"
pending
_ rename video.Camera to video.Video ? Capture ?
@@ -55,14 +56,6 @@ file is empty.
the only way to make File>Save As actually save new files, as far as i
can tell, is to Save As once, make at least one change, then Save.
what happens if folder already exists on save as?
saving a project over an already existing project does not get rid of
the .pde files that arent overwritten. not sure if this is feature or
bug, but it took me by surprise. it seemed to only overwrite .pde
files with the same name, but everything else in that project folder
stays as is.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .