[Issue 17488] Platform-inconsistent behavior from getTempDir()
https://issues.dlang.org/show_bug.cgi?id=17488 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Dlang Bot --- dlang/phobos pull request #5476 "Fix issue 17488: Add trailing slash to POSIX tempDir() to match Windows behaviour" was merged into master: - 02f4f148cf4056aa01c6d43d9fcbcaf9c2787f3c by Ryan Frame: Fix Issue 17488 - Add trailing slash to POSIX tempDir() to match Windows behaviour https://github.com/dlang/phobos/pull/5476 --
[Issue 17488] Platform-inconsistent behavior from getTempDir()
https://issues.dlang.org/show_bug.cgi?id=17488 --- Comment #6 from Dlang Bot --- @rjframe updated dlang/phobos pull request #5476 "Fix issue 17488: Add trailing slash to POSIX tempDir() to match Windows behaviour" fixing this issue: - Fix Issue 17488 - Add trailing slash to POSIX tempDir() to match Windows behaviour https://github.com/dlang/phobos/pull/5476 --
[Issue 17488] Platform-inconsistent behavior from getTempDir()
https://issues.dlang.org/show_bug.cgi?id=17488 Vladimir Panteleev changed: What|Removed |Added Keywords||pull --- Comment #5 from Vladimir Panteleev --- I see you created a PR: https://github.com/dlang/phobos/pull/5476 --
[Issue 17488] Platform-inconsistent behavior from getTempDir()
https://issues.dlang.org/show_bug.cgi?id=17488 --- Comment #4 from Vladimir Panteleev --- OK, I see a rationale in the pull request discussion (https://github.com/dlang/phobos/pull/2150) (should've been in the commit message, BTW): > Android doesn't have a global temp directory and a couple tests fail > if the full path isn't used for the local directory, so I modified > tempDir() to use the full path. The appropriate thing to do at that point would have been to fix the tests instead of changing the behaviour of a public function. However, at this point it's been three years since the change, so today the most sensible course is probably to update the documentation (e.g. saying that the function returns the current directory on failure would not be incorrect for both the old and new behaviour). --
[Issue 17488] Platform-inconsistent behavior from getTempDir()
https://issues.dlang.org/show_bug.cgi?id=17488 Vladimir Panteleev changed: What|Removed |Added CC||db...@joakim.fea.st --- Comment #3 from Vladimir Panteleev --- Hmm, I see it was changed in https://github.com/dlang/phobos/commit/11de397dd7440403df54f84c3674c955c2563fbf#diff-52580fb75b304ba7b04a6b178fe6cdf4L3140 to return getcwd() instead of ".". If there was a reason behind it, it was not specified or documented - that change should not have passed review. CC Joakim, can you shine some light on this? Is that change really needed (and simply undocumented), or was it a stray change we can revert? --
[Issue 17488] Platform-inconsistent behavior from getTempDir()
https://issues.dlang.org/show_bug.cgi?id=17488 --- Comment #2 from dl...@ryanjframe.com --- According the the tempDir documentation: On all platforms, tempDir returns "." on failure, representing the current working directory. On failure, the value of getcwd() is returned; on my test (Windows and Ubuntu 14.04) that's the absolute directory, not ".". Should I change the documentation to match the code, or change the code to match the docs? --
[Issue 17488] Platform-inconsistent behavior from getTempDir()
https://issues.dlang.org/show_bug.cgi?id=17488 Vladimir Panteleev changed: What|Removed |Added CC||thecybersha...@gmail.com --- Comment #1 from Vladimir Panteleev --- (In reply to dlang from comment #0) > I can do the PR if I know the desired behaviour (add the slash to POSIX or > remove it from Windows). Definitely add it - double slashes will behave the same as a single slash, so adding a slash where existing code also added one will not result in change of behavior. Doing it the other way around is likely to break programs on Windows. --