mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-02 22:55:53 +00:00
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:
1 parent
47b8184a55
commit
912e6ba8fe
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user