[erlang-questions] windows paths in filename module
Fri Nov 25 15:05:36 CET 2011
On 25 November 2011 13:56, Antoine Koener <> wrote:
> If this really bugs you, note that windows doesn't really care about / or
> cd C:/Program Files/Putty gets you in the putty directory...
> Shell completion (cmd.exe) may not work but, Win32 CreateFile works
> Then I would suggest that you don't have to bother with "nativename"
I can live with that, but I do need filename:join to behave itself when the
first path is a drive letter. My requirement is to locate the equivalent of
the home directory on windows platforms. I'm currently checking for the
%USERPROFILE% environment variable, and if this is missing I fall back to
%HOMEDRIVE% \\ %HOMEPATH% <file://%20%25homepath%25/> and it was doing this
that alerted me to this unexpected behaviour in the filename module.
Is there a better way of locating the user's home/profile directory on
windows platforms in general? I will happily use some other API if it's
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions