Skip to content

Commit cc99a67

Browse files
committed
Rewrote the if statement that checks of the new data folder exists to a more readable form.
1 parent 59b95d9 commit cc99a67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public void saveAs(File newFolder) throws IOException {
356356
if (getDataFolder().exists()) {
357357
File newDataFolder = new File(newFolder, "data");
358358
// Check if data folder exits, if not try to create the data folder
359-
if (!(newDataFolder.exists() || newDataFolder.mkdirs())) {
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)