Skip to content

Commit

Permalink
Fix CDS archiveFile.setWritable (#1082)
Browse files Browse the repository at this point in the history
Use jri.resolve(archiveFile), as archiveFile is a path relative to the JRI directory.

Fixes #1078
  • Loading branch information
romain-grecourt authored Oct 31, 2024
1 parent 1dad467 commit c766854
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2022 Oracle and/or its affiliates.
* Copyright (c) 2019, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -365,7 +365,7 @@ private void buildCdsArchive() throws Exception {
}
if (Constants.OS == OSType.Windows) {
// Try to make the archive file writable so that a second run can delete the image
archiveFile.toFile().setWritable(true);
jri.resolve(archiveFile).toFile().setWritable(true);
}
}

Expand Down

0 comments on commit c766854

Please sign in to comment.