Skip to content

Commit

Permalink
Remove left and right path preprocessing in startFolderDiff
Browse files Browse the repository at this point in the history
Now it's caller responsibility to provide correct paths
  • Loading branch information
nikitinas committed Aug 26, 2024
1 parent ad6a545 commit 3a0a7a2
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public void startFolderDiff(JSString leftPath, JSString rightPath, Channel chann
JsHelper.consoleInfo("Starting folder diff ");
boolean scanFileContent = true;

leftPath = preparePath(leftPath);
rightPath = preparePath(rightPath);

if (notDir(leftPath))
throw new IllegalArgumentException("Left path " + leftPath.stringValue() + " should be directory");
if (notDir(rightPath))
Expand Down Expand Up @@ -165,11 +162,4 @@ public static boolean isDir(JSString path) {
return Fs.isDirectory(path);
}

static JSString preparePath(JSString jsString) {
String result = jsString.stringValue();
if (result.startsWith("file:///")) result = result.substring("file:///".length());
return JSString.valueOf(
result.replace("%3A", ":")
);
}
}

0 comments on commit 3a0a7a2

Please sign in to comment.