From 36bce39ff4fe7fe3f606d7d9599c30e4c7392785 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 16 Jan 2015 14:24:52 -0500 Subject: [PATCH] [FIXED JENKINS-26476] Work around Remoting problem by avoiding reference to Functions. --- core/src/main/java/hudson/FilePath.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index fbbc89e876..1fe2de55c8 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -1581,6 +1581,7 @@ public final class FilePath implements Serializable { act(new SecureFileCallable() { private static final long serialVersionUID = 1L; public Void invoke(File f, VirtualChannel channel) throws IOException { + // TODO first check for Java 7+ and use PosixFileAttributeView _chmod(writing(f), mask); return null; @@ -1592,7 +1593,9 @@ public final class FilePath implements Serializable { * Run chmod via jnr-posix */ private static void _chmod(File f, int mask) throws IOException { - if (Functions.isWindows()) return; // noop + // TODO WindowsPosix actually does something here (WindowsLibC._wchmod); should we let it? + // Anyway the existing calls already skip this method if on Windows. + if (File.pathSeparatorChar==';') return; // noop PosixAPI.jnr().chmod(f.getAbsolutePath(),mask); } -- GitLab