Skip to content

Commit f5a831d

Browse files
committed
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
1 parent 6742bf5 commit f5a831d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ Release 0.22.0 - Unreleased
468468

469469
HADOOP-7122. Fix thread leak when shell commands time out. (todd)
470470

471+
HADOOP-7126. Fix file permission setting for RawLocalFileSystem on Windows.
472+
(Po Cheung via shv)
473+
471474
Release 0.21.1 - Unreleased
472475

473476
IMPROVEMENTS

src/java/org/apache/hadoop/fs/RawLocalFileSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ public void setPermission(Path p, FsPermission permission)
567567
private static String execCommand(File f, String... cmd) throws IOException {
568568
String[] args = new String[cmd.length + 1];
569569
System.arraycopy(cmd, 0, args, 0, cmd.length);
570-
args[cmd.length] = f.getCanonicalPath();
570+
args[cmd.length] = FileUtil.makeShellPath(f, true);
571571
String output = Shell.execCommand(args);
572572
return output;
573573
}

0 commit comments

Comments
 (0)