Skip to content

Commit b23cd02

Browse files
committed
Avoid double // in path
1 parent f8df290 commit b23cd02

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/commonwl/view/researchobject/ROBundleService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,12 @@ private void addFilesToBundle(GitDetails gitDetails, Bundle bundle, Path bundleP
254254
// Where to store the new file
255255
Path bundleFilePath = bundlePath.resolve(file.getName());
256256
Path gitFolder = Paths.get(gitDetails.getPath());
257-
Path gitPath = bundlePath.getRoot().resolve(gitFolder.resolve(file.getName()));
257+
String relativePath = gitFolder.resolve(file.getName()).toString();
258+
Path gitPath = bundlePath.getRoot().resolve(relativePath); // would start with /
258259

259260
// Get direct URL permalink
260261
URI rawURI = new URI("https://w3id.org/cwl/view/git/" + workflow.getLastCommit() +
261-
"/" + gitPath + "?format=raw");
262+
gitPath + "?format=raw");
262263

263264
// Variable to store file contents and aggregation
264265
String fileContent = null;

0 commit comments

Comments
 (0)