mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 19:05:34 +01:00
properly remove folders that are overwritten on "save as"
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
9
todo.txt
9
todo.txt
@@ -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.
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user