From e82df7e7f7360942ddc99b542c465c4716b2e775 Mon Sep 17 00:00:00 2001 From: Konstantin Shvachko Date: Tue, 1 Feb 2011 03:02:06 +0000 Subject: [PATCH] HADOOP-7126. Fix file permission setting for RawLocalFileSystem on Windows. Contributed by Po Cheung. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1065901 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/java/org/apache/hadoop/fs/RawLocalFileSystem.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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; }