Skip to content

Commit 59b95d9

Browse files
committed
The save as method now checks if the data folder already exists before it tries to create one.
1 parent 11d3145 commit 59b95d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arduino-core/src/processing/app/Sketch.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ public void saveAs(File newFolder) throws IOException {
355355
// Copy the data folder (this may take a while.. add progress bar?)
356356
if (getDataFolder().exists()) {
357357
File newDataFolder = new File(newFolder, "data");
358-
// Create the data folder
359-
if (!newDataFolder.mkdirs()) {
358+
// Check if data folder exits, if not try to create the data folder
359+
if (!(newDataFolder.exists() || newDataFolder.mkdirs())) {
360360
String msg = I18n.format(tr("Could not create directory \"{0}\""), newFolder.getAbsolutePath());
361361
throw new IOException(msg);
362362
}

0 commit comments

Comments
 (0)