Skip to content

Commit

Permalink
HDDS-12075. Handle slash character in key names for read replica command
Browse files Browse the repository at this point in the history
  • Loading branch information
ptlrs committed Jan 13, 2025
1 parent e2102a7 commit 63ed060
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ protected void execute(OzoneClient client, OzoneAddress address)
File manifestFile
= new File(dir, manifestFileName);
System.out.println("Writing manifest file: " + manifestFile.getAbsolutePath());
if (manifestFile.getParent() != null) {
Files.createDirectories(Paths.get(manifestFile.getParent()));
Path parentPath = manifestFile.getParentFile() != null ? manifestFile.getParentFile().toPath() : null;
if (parentPath != null) {
Files.createDirectories(parentPath);
}
Files.write(manifestFile.toPath(),
prettyJson.getBytes(StandardCharsets.UTF_8));
Expand Down

0 comments on commit 63ed060

Please sign in to comment.