Skip to content

Commit

Permalink
Encode Dataset id-s
Browse files Browse the repository at this point in the history
  • Loading branch information
fintanorbert committed Mar 1, 2024
1 parent 79c6dbd commit 9cef111
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down Expand Up @@ -2284,7 +2286,7 @@ private String createRoIdForDataset(String folderName, JsonNode parentObj) {
if (parentId.equals("./")) {
parentId = "";
}
return parentId + folderName + "/";
return parentId + URLEncoder.encode(folderName.replaceAll("\\s", "_"), StandardCharsets.UTF_8) + "/";
}

// At this point this function would be useless
Expand Down

0 comments on commit 9cef111

Please sign in to comment.