[ https://issues.apache.org/jira/browse/HADOOP-1891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530191 ]
chris.douglas edited comment on HADOOP-1891 at 9/25/07 11:20 AM: ----------------------------------------------------------------- > Hmm. It does what I'd expect. "./foo" and "foo" name the same file, no? > What's unexpected? Well, "." and {{fs.getWorkingDirectory()}} aren't the same thing, as in the above example. That was surprising to me, at least. Path can keep enough information after URI normalization to know that the original was a relative path when the string is "./foo", but not when it's simply "." Path already throws when it gets an empty string; would it be reasonable to assume that a Path successfully constructed as the empty string refers to the working directory? I can't think of a situation where reporting its URI as Path.CUR_DIR would be an error. It would also work in {{new Path("foo/bar", "../..")}}, etc. What problem is this causing? [Edit] We'd also see fewer bugs like HADOOP-1902 was (Author: chris.douglas): > Hmm. It does what I'd expect. "./foo" and "foo" name the same file, no? What's unexpected? Well, "." and {{fs.getWorkingDirectory()}} aren't the same thing, as in the above example. That was surprising to me, at least. Path can keep enough information after URI normalization to know that the original was a relative path when the string is "./foo", but not when it's simply "." Path already throws when it gets an empty string; would it be reasonable to assume that a Path successfully constructed as the empty string refers to the working directory? I can't think of a situation where reporting its URI as Path.CUR_DIR would be an error. It would also work in {{new Path("foo/bar", "../..")}}, etc. What problem is this causing? > "." is converted to an empty path > --------------------------------- > > Key: HADOOP-1891 > URL: https://issues.apache.org/jira/browse/HADOOP-1891 > Project: Hadoop > Issue Type: Bug > Components: dfs > Affects Versions: 0.14.1 > Environment: Linux > Reporter: Olga Natkovich > Assignee: Chris Douglas > > Path p = new Path("."); > System.out.println("path=(" + p.toString() +")"); > path =() -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.