You've already forked jenkins-lib
forked from jenkins/jenkins-lib
fix
This commit is contained in:
@@ -78,7 +78,7 @@ class GetExtensions implements Serializable {
|
|||||||
localPathToExtension.copyFrom(new URL(extension.path))
|
localPathToExtension.copyFrom(new URL(extension.path))
|
||||||
} else {
|
} else {
|
||||||
// If the path is a local file, copy the file
|
// 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)
|
FilePath localFilePath = FileUtils.getFilePath(localPath)
|
||||||
localPathToExtension.copyFrom(localFilePath)
|
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:) то это абсолютный путь
|
// Если путь начинается с / или начинается с \\, или начинается с "Буквы диска" и ":"(Прим C:) то это абсолютный путь
|
||||||
if (path.startsWith("/") || path.startsWith("\\\\") || path.matches("^[A-Za-z]:.*")) {
|
if (path.startsWith("/") || path.startsWith("\\\\") || path.matches("^[A-Za-z]:.*")) {
|
||||||
return path
|
return path
|
||||||
|
Reference in New Issue
Block a user