Skip to content

Commit

Permalink
Explain reasoning as comment
Browse files Browse the repository at this point in the history
  • Loading branch information
olpaw committed Jan 15, 2024
1 parent 888a494 commit 58d9e1b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,11 @@ private int completeImageBuild() {
imageNamePathParent = imagePath.resolve(imageNamePathParent);
}
if (!useBundle()) {
/*
* In bundle-mode the value of imagePath is purely virtual before it gets
* substituted by substituteImagePath(imagePath) below. Validating the virtual value
* would make no sense (and cause errors if the path does not exist anymore)
*/
if (!Files.isDirectory(imageNamePathParent)) {
throw NativeImage.showError("Writing image to non-existent directory " + imageNamePathParent + " is not allowed. " +
"Create the missing directory if you want the image to be written to that location.");
Expand Down

0 comments on commit 58d9e1b

Please sign in to comment.