mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-30 21:15:23 +00:00
bug fix. Local write() should create parent directories just like remote write().
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1773 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
161b951b6d
commit
9dfd5b8200
1 file changed
+5
-2
@@ -439,8 +439,11 @@ public final class FilePath implements Serializable {
|
||||
* If the directory doesn't exist, it will be created.
|
||||
*/
|
||||
public OutputStream write() throws IOException, InterruptedException {
|
||||
if(channel==null)
|
||||
return new FileOutputStream(new File(remote));
|
||||
if(channel==null) {
|
||||
File f = new File(remote);
|
||||
f.getParentFile().mkdirs();
|
||||
return new FileOutputStream(f);
|
||||
}
|
||||
|
||||
return channel.call(new Callable<OutputStream,IOException>() {
|
||||
public OutputStream call() throws IOException {
|
||||
|
||||
Reference in new issue
Block a user