mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
[FIXED HUDSON-4180] - Changed calls for URL.getPath() to URL.toURI().getPath() in order to de-escape spaces (and others) correctly.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20560 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
52015e2c98
commit
574b3d4961
1 file changed
+2
-2
@@ -82,7 +82,7 @@ public interface HudsonHomeLoader {
|
||||
public File allocate() throws Exception {
|
||||
File target = NEW.allocate();
|
||||
if(source.getProtocol().equals("file")) {
|
||||
File src = new File(source.getPath());
|
||||
File src = new File(source.toURI().getPath());
|
||||
if(src.isDirectory())
|
||||
new FilePath(src).copyRecursiveTo("**/*",new FilePath(target));
|
||||
else
|
||||
@@ -116,7 +116,7 @@ public interface HudsonHomeLoader {
|
||||
if(!res.getProtocol().equals("file"))
|
||||
throw new AssertionError("Test data is not available in the file system: "+res);
|
||||
// if we picked up a directory, it's one level above config.xml
|
||||
File home = new File(res.getPath());
|
||||
File home = new File(res.toURI().getPath());
|
||||
if(!home.getName().endsWith(".zip"))
|
||||
home = home.getParentFile();
|
||||
|
||||
|
||||
Reference in new issue
Block a user