Open retrogradeorbit opened 9 years ago
Any particular reason this would be better?
It's better because the existing implementation returns the wrong directory for any non standard user, or any system with users laid out in multiple directory hierarchies. This patch returns the correct home directory for those users. For instance, running as a standard user (who has their home directory under /home/user) ask for the home directory of www-data; say (home "www-data") and the existing implementation returns "/home/www-data" which on my system is completely wrong. www-data's home directory is "/var/www". ask for home dir of "root" and you get "/home/root" not "/root". This patch returns the correct home directory for every user by querying the operating system.
Your comment here aludes to this problem:
https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj#L27
This resolves issue #12. I haven't tested it on windows, but on windows it will return nil, which is not ideal, but it never actually worked properly anyway, so it might be better.