hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1399101 - in /hadoop/common/branches/branch-1-win: CHANGES.branch-1-win.txt src/core/org/apache/hadoop/fs/FileUtil.java
Date Wed, 17 Oct 2012 05:22:20 GMT
Author: suresh
Date: Wed Oct 17 05:22:20 2012
New Revision: 1399101

URL: http://svn.apache.org/viewvc?rev=1399101&view=rev
Log:
HADOOP-8868. FileUtil#chmod should normalize the path before calling into shell APIs. Contributed
by Ivan Mitic.

Modified:
    hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
    hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java

Modified: hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt?rev=1399101&r1=1399100&r2=1399101&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt Wed Oct 17 05:22:20 2012
@@ -157,3 +157,6 @@ Branch-hadoop-1-win - unreleased
 
     HADOOP-8912. Add .gitattributes file to prevent CRLF and LF mismatches 
     for source and text files. (Raja Aluri via suresh)
+
+    HADOOP-8868. FileUtil#chmod should normalize the path before calling 
+    into shell APIs. (Ivan Mitic via suresh)

Modified: hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java?rev=1399101&r1=1399100&r2=1399101&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java (original)
+++ hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java Wed Oct
17 05:22:20 2012
@@ -642,7 +642,7 @@ public class FileUtil {
     String [] cmd = Shell.getSetPermissionCommand(perm, recursive);
     String[] args = new String[cmd.length + 1];
     System.arraycopy(cmd, 0, args, 0, cmd.length);
-    args[cmd.length] = filename;
+    args[cmd.length] = new File(filename).getPath();
     ShellCommandExecutor shExec = new ShellCommandExecutor(args);
     try {
       shExec.execute();



Mime
View raw message