Skip to content

Commit

Permalink
bugfix: logic error while handling a mkdirs() failure
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Feb 13, 2024
1 parent e71c1c2 commit b0908a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HeartLibrary/src/main/java/jme3utilities/Heart.java
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,8 @@ public static void writeImage(String filePath, RenderedImage image)
if (parentDirectory != null && !parentDirectory.exists()) {
boolean success = parentDirectory.mkdirs();
if (!success) {
String path = parentDirectory.toString();
String parentPath = parentDirectory.toString();
quotedPath = MyString.quote(parentPath);
throw new IOException("Unable to create " + quotedPath);
}
}
Expand Down

0 comments on commit b0908a7

Please sign in to comment.