New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong results from Cwd::abspath and Cwd::fast_abs_path #14887
Comments
From jrw32982@yahoo.comCreated by jrw32982@yahoo.comThis bug affects both Cwd::abs_path (on cygwin) and Cwd::fast_abs_path (on Assuming /MYFILE exists (for some file) and is a file and pwd is /, then: cygwin $ cd / linux $ cd / The outputs are wrong since they start with // instead of /. This is Perl Info
|
From @ikegamiOn Thu, Sep 3, 2015 at 10:44 AM, John Wiersba <perlbug-followup@perl.org>
No, they aren't wrong for non-cygwin unix systems. $ ls -ld /home $ ls -ld //home They're just not canonical. But they are indeed wrong for Cygwin. $ ls -ld /home $ ls -ld //home |
The RT System itself - Status changed from 'new' to 'open' |
From @ilmariEric Brine <ikegami@adaelis.com> writes:
This may be the case on your system, but POSIX allows implementations to If a pathname begins with two successive <slash> characters, the http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12
And AFAIK for QNX as well, which takes advantage of the above POSIX -- |
From jrw32982@yahoo.comHi, Eric. I believe they are also wrong for unix/linux. i'm familiar with the semantics of a leading // on unix/linux. But the purpose of these functions is to canonicalize the path by, for example, removing symlinks, and "." and ".." components, which they do for every other input. They also replace //+ with /. From http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html If there are multiple pathnames that getcwd() could place in the array pointed to by buf, one beginning with asingle <slash> character and one or more beginning with two <slash> characters, then getcwd() shall place thepathname beginning with a single <slash> character in the array. From: Eric Brine via RT <perlbug-followup@perl.org>
No, they aren't wrong for non-cygwin unix systems. $ ls -ld /home $ ls -ld //home They're just not canonical. But they are indeed wrong for Cygwin. $ ls -ld /home $ ls -ld //home
|
From jrw32982@yahoo.comCreated by jrw32982@yahoo.com# on Linux: # on Cygwin: This has existed for many releases for both Cygwin and Linux (and perhaps Perl Info
|
From @jkeenanOn Fri, 09 Jun 2017 20:52:42 GMT, jrw32982@yahoo.com wrote:
Is this the same problem you reported in https://rt-archive.perl.org/perl5/Ticket/Display.html?id=125979 ? Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From jrw32982@yahoo.comYou are right, I had forgotten that I had reported it then. It's the same issue and it appears it's still present in perl 5.26. I reported it again because I was just writing a module where I use abs_path() and I have to have code to handle the bug: -- John From: James E Keenan via RT <perlbug-followup@perl.org>
Is this the same problem you reported in https://rt-archive.perl.org/perl5/Ticket/Display.html?id=125979 ? Thank you very much. --
|
Migrated from rt.perl.org#125979 (status was 'open')
Searchable as RT125979$
The text was updated successfully, but these errors were encountered: