dlang / phobos

The standard library of the D programming language
https://dlang.org
Boost Software License 1.0
1.18k stars 703 forks source link

thisExePath returns different results on Linux and Mac OSX #10086

Open dlangBugzillaToGithub opened 10 years ago

dlangBugzillaToGithub commented 10 years ago

dlang (@SerialVelocity) reported this on 2014-09-22T04:02:20Z

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

CC List

Description

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)
dlangBugzillaToGithub commented 4 years ago

bugzilla (@WalterBright) commented on 2019-12-11T07:50:04Z

Related issue: https://issues.dlang.org/show_bug.cgi?id=16595