#14018: sage-location problem with symlinks
---------------------------------------------+------------------------------
Reporter: cnassau | Owner: tdb
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-5.7
Component: relocation | Resolution:
Keywords: relocation, symbolic link | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Christian Nassau | Merged in:
Dependencies: | Stopgaps:
---------------------------------------------+------------------------------
Comment (by cnassau):
Replying to [comment:4 jdemeyer]:
> It seems that `bash` treats `//` different from `/`:
> {{{
> jdemeyer@sage:/$ cd //
> jdemeyer@sage://$ pwd
> //
> }}}
>
> So it seems to be a feature rather than a bug. It only happens for the
root though:
> {{{
> jdemeyer@sage:/$ cd /usr//bin
> jdemeyer@sage:/usr/bin$ pwd
> /usr/bin
> }}}
Indeed, a google search reveals [from
http://seclists.org/fulldisclosure/2012/Nov/141 ]
The following quote is from IEEE Std 1003.1, 2004 Edition:
A pathname consisting of a single slash shall resolve to the root
directory of the process. A null pathname shall not be successfully
resolved. A pathname that begins with two successive slashes may be
interpreted in an implementation-defined manner, although more than
two leading slashes shall be treated as a single slash.
http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11
I think this means that processes **can** choose to interpret
"{{{//whatever}}}" in some special, unforeseeable way. But this doesn't
happen on my system where "{{{os.path.samefile(...)}}}" correctly verifies
the identity between the two locations. So I think my patch is doing the
right thing here.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14018#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.