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
This commit is contained in:
kohsuke committed 2009-12-24 02:42:00 +00:00
1 parent 47b8184a55
commit 912e6ba8fe
1 file changed
+1 -1
+1 -1
View File
@@ -1005,7 +1005,7 @@ public final class FilePath implements Serializable {
if(!isUnix() || mask==-1) return;
act(new FileCallable<Void>() {
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;
}