1
0
This commit is contained in:
ivanovEV
2024-03-14 23:24:33 +03:00
parent f846295a74
commit ebb7afe45c

View File

@@ -78,7 +78,7 @@ class GetExtensions implements Serializable {
localPathToExtension.copyFrom(new URL(extension.path))
} else {
// If the path is a local file, copy the file
String localPath = getAbsolutePath(extension.path)
String localPath = getAbsolutePath(extension.path, env)
FilePath localFilePath = FileUtils.getFilePath(localPath)
localPathToExtension.copyFrom(localFilePath)
}
@@ -114,7 +114,7 @@ class GetExtensions implements Serializable {
}
}
private static String getAbsolutePath(String path) {
private static String getAbsolutePath(String path, def env) {
// Если путь начинается с / или начинается с \\, или начинается с "Буквы диска" и ":"(Прим C:) то это абсолютный путь
if (path.startsWith("/") || path.startsWith("\\\\") || path.matches("^[A-Za-z]:.*")) {
return path