mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2025-01-05 13:10:28 +02:00
fix
This commit is contained in:
parent
923725a750
commit
316893714f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user