Closed linquize closed 12 years ago
Note that for a normal Windows desktop user, environment variables HOMEDRIVE and HOMEPATH are set. But for other kind of user like ASP.NET user, environment variables HOMEDRIVE and HOMEPATH are NOT set, so it fallback to use a generic method: Environment.GetFolderPath() What I currently failed is to run on an ASP.NET user.
Thanks for the pull request. The change looks sane to me.
This breaks several of our unit tests as SpecialFolder.UserProfile returns null under macos/linux. I modified the code to use UserProfile and then fall back to Personal. If both fail the default value for this will just be null, which should crash. The value can be overridden by calling Sharpen.Runtime.SetProperty ("user.home") though.
user.home should come from Environment.SpecialFolder.UserProfile, because Environment.SpecialFolder.Personal returns "My Documents" in MS .NET