From 912e6ba8fe1bd6e2097c305f69655edade3d48ae Mon Sep 17 00:00:00 2001 From: kohsuke Date: Thu, 24 Dec 2009 02:42:00 +0000 Subject: [PATCH] since FilePath.isUnix() isn't a complete guess, we need another safety check here. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24898 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/FilePath.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index 34794a5b98..566cf6072a 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -1005,7 +1005,7 @@ public final class FilePath implements Serializable { if(!isUnix() || mask==-1) return; act(new FileCallable() { public Void invoke(File f, VirtualChannel channel) throws IOException { - if(LIBC.chmod(f.getAbsolutePath(),mask)!=0) + if(File.separatorChar=='/' && LIBC.chmod(f.getAbsolutePath(),mask)!=0) throw new IOException("Failed to chmod "+f+" : "+LIBC.strerror(Native.getLastError())); return null; }