Skip to content

Commit 397c6e3

Browse files
committed
allow directory to exist in Util.copyDir() (fixes #530)
1 parent 05fc58f commit 397c6e3

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

app/src/processing/app/Base.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,9 +1280,9 @@ public void handleNew() {
12801280
handleOpenUntitled(path);
12811281

12821282
} catch (IOException e) {
1283-
Messages.showWarning("That's new to me",
1284-
"A strange and unexplainable error occurred\n" +
1285-
"while trying to create a new sketch.", e);
1283+
Messages.showTrace("That's new to me",
1284+
"A strange and unexplainable error occurred\n" +
1285+
"while trying to create a new sketch.", e, false);
12861286
}
12871287
}
12881288

app/src/processing/app/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ static public void copyDir(File sourceDir,
264264
final String urDum = "source and target directories are identical";
265265
throw new IllegalArgumentException(urDum);
266266
}
267-
if (!targetDir.mkdirs()) {
267+
if (!targetDir.exists() && !targetDir.mkdirs()) {
268268
throw new IOException("Could not create " + targetDir);
269269
}
270270
String[] filenames = sourceDir.list();

todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
1286 (4.0.1)
2+
X Changing into p5.js mode gives an error
3+
X https://github.com/processing/processing4/issues/530
24

35

46
known issues

0 commit comments

Comments
 (0)