diff --git a/CHANGES.txt b/CHANGES.txt index b6ca1b4c95..3b50965ed2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -468,6 +468,9 @@ Release 0.22.0 - Unreleased HADOOP-7122. Fix thread leak when shell commands time out. (todd) + HADOOP-7126. Fix file permission setting for RawLocalFileSystem on Windows. + (Po Cheung via shv) + Release 0.21.1 - Unreleased IMPROVEMENTS diff --git a/src/java/org/apache/hadoop/fs/RawLocalFileSystem.java b/src/java/org/apache/hadoop/fs/RawLocalFileSystem.java index 0ecdd6241e..18ef152baf 100644 --- a/src/java/org/apache/hadoop/fs/RawLocalFileSystem.java +++ b/src/java/org/apache/hadoop/fs/RawLocalFileSystem.java @@ -567,7 +567,7 @@ public void setPermission(Path p, FsPermission permission) private static String execCommand(File f, String... cmd) throws IOException { String[] args = new String[cmd.length + 1]; System.arraycopy(cmd, 0, args, 0, cmd.length); - args[cmd.length] = f.getCanonicalPath(); + args[cmd.length] = FileUtil.makeShellPath(f, true); String output = Shell.execCommand(args); return output; }