Further file-related observations:
Project.resolveFile() methods claim to return
canonical files, but they actually defer to FileUtils
methods that claim to return absolute files.
FileUtils.resolveFile claims to return absolute files;
however calling FileUtils.resolveFile(null, "\\") on
DOS returns the non-absolute File "\\". So we lie.
:)
-Matt
--- Matt Benson <gudnabrsam@yahoo.com> wrote:
> This method will:
>
> * Uppercase the drive letter if there is one.
> * Remove redundant slashes after the drive spec.
> * Resolve all ./, .\, ../ and ..\ sequences.
> * DOS style paths that start with a drive letter
> will have \ as the separator.
>
> Other DOS considerations:
>
> when a drive letter is supplied and there is no
> separator immediately following, the meaning is
> different. Supplying the separator here yields the
> wrong filename. In this case the meaning is that
> the
> remaining filename beyond the colon is relative to
> the
> current directory for that drive. As we resolve .
> and
> .. components of the filename, I think we should be
> resolving this to the full path intended.
>
> when a single separator leads the path, the path is
> relative to the root of the current directory. I
> think we should be resolving that directory as well
> to
> be pointing to the correct file.
>
> OR it may be that we should detect these conditions
> as
> NOT being absolute pathnames on DOS.
> File.isAbsolute() returns false in these cases.
> However, we should still provide some means of
> obtaining the absolute forms of these names as well.
>
> The only reason I bring it up rather than just
> making
> the necessary changes is (1) that there is a choice
> of
> which to do, and (2) that the first alternative will
> break existing testcases (Project.testResolveFile at
> least). No idea what the second (possibly more
> correct) alternative will break.
>
> Thoughts?
>
> -Matt
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
|