mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Regression introduced by the fix of PY-19192 fixed
The root remote path of a path mapping should be replaceable itself. Regression caught by PyRemotePathMapperTest.testReplicatedFolderInsideSysPath().
This commit is contained in:
@@ -345,6 +345,7 @@ public class PathMappingSettings extends AbstractPathMapper implements Cloneable
|
||||
private static boolean canReplaceRemote(@NotNull String path, @NotNull String remotePrefix) {
|
||||
path = norm(path);
|
||||
remotePrefix = norm(remotePrefix);
|
||||
return path.startsWith(remotePrefix) && (remotePrefix.endsWith("/") || path.substring(remotePrefix.length()).startsWith("/"));
|
||||
return path.startsWith(remotePrefix) &&
|
||||
(path.length() == remotePrefix.length() || remotePrefix.endsWith("/") || path.substring(remotePrefix.length()).startsWith("/"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user