www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13518] New: thisExePath returns different results on Linux

https://issues.dlang.org/show_bug.cgi?id=13518

          Issue ID: 13518
           Summary: thisExePath returns different results on Linux and Mac
                    OSX
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: dlang chillichef.com

When the executable is symlinked to another location, running thisExePath on
Linux gives the symlinked location. Doing the same on Mac OSX returns the
original location (doesn't follow the symlink).

Both outcomes are wanted in some cases though so when fixing this, maybe it is
a good idea to add an optional flag to follow symlinks? (I think it makes sense
for the flag defaultto to be false)

--
Sep 21 2014