mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
more saving fixes
This commit is contained in:
@@ -752,7 +752,9 @@ public class Sketch {
|
||||
// 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);
|
||||
if (newFolder.exists()) {
|
||||
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.
|
||||
|
||||
@@ -774,7 +776,9 @@ public class Sketch {
|
||||
code[0].name = newName;
|
||||
// write the contents to the renamed file
|
||||
// (this may be resaved if the code is modified)
|
||||
code[0].save();
|
||||
code[0].modified = true;
|
||||
//code[0].save();
|
||||
//System.out.println("modified is " + modified);
|
||||
|
||||
// change the other paths
|
||||
String oldName = name;
|
||||
@@ -1968,7 +1972,9 @@ public class Sketch {
|
||||
} else {
|
||||
// check to see if each modified code file can be written to
|
||||
for (int i = 0; i < codeCount; i++) {
|
||||
if (code[i].modified && !code[i].file.canWrite()) {
|
||||
if (code[i].modified &&
|
||||
!code[i].file.canWrite() &&
|
||||
code[i].file.exists()) {
|
||||
//System.err.println("found a read-only file " + code[i].file);
|
||||
return true;
|
||||
}
|
||||
|
||||
21
todo.txt
21
todo.txt
@@ -30,6 +30,17 @@ first, it asks you if you want to save but mentions the pre-rename
|
||||
name. But I hit yes, quit, came back in, and all seemed right in the
|
||||
world.
|
||||
|
||||
X "save as" not actually saving properly
|
||||
File>New
|
||||
edit file...
|
||||
File>Save As
|
||||
File>Open some other file
|
||||
File>Open original file
|
||||
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.
|
||||
|
||||
|
||||
pending
|
||||
_ rename video.Camera to video.Video ? Capture ?
|
||||
_ VideoInput VideoOutput, SoundInput, SoundOutput or AudioInput/AudioOutput
|
||||
@@ -61,16 +72,6 @@ unhide "a_2"
|
||||
unhide "a"
|
||||
where did "a_2" go ?
|
||||
|
||||
(74) "save as" not actually saving properly
|
||||
File>New
|
||||
edit file...
|
||||
File>Save As
|
||||
File>Open some other file
|
||||
File>Open original file
|
||||
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.
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user