We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11d3145 commit 59b95d9Copy full SHA for 59b95d9
arduino-core/src/processing/app/Sketch.java
@@ -355,8 +355,8 @@ public void saveAs(File newFolder) throws IOException {
355
// Copy the data folder (this may take a while.. add progress bar?)
356
if (getDataFolder().exists()) {
357
File newDataFolder = new File(newFolder, "data");
358
- // Create the data folder
359
- if (!newDataFolder.mkdirs()) {
+ // Check if data folder exits, if not try to create the data folder
+ if (!(newDataFolder.exists() || newDataFolder.mkdirs())) {
360
String msg = I18n.format(tr("Could not create directory \"{0}\""), newFolder.getAbsolutePath());
361
throw new IOException(msg);
362
}
0 commit comments