#1838: do not use getEnv "HOME", use System.Directory.getHomeDirectory
---------------------+------------------------------------------------------
 Reporter:  guest    |          Owner:  igloo   
     Type:  bug      |         Status:  reopened
 Priority:  normal   |      Milestone:  6.8.3   
Component:  GHCi     |        Version:  6.8.2   
 Severity:  normal   |     Resolution:          
 Keywords:           |     Difficulty:  Unknown 
 Testcase:           |   Architecture:  Unknown 
       Os:  Windows  |  
---------------------+------------------------------------------------------
Changes (by [EMAIL PROTECTED]):

  * status:  closed => reopened
  * type:  merge => bug
  * version:  6.6.1 => 6.8.2
  * resolution:  fixed =>
  * milestone:  6.8.2 => 6.8.3

Comment:

 Mailing list contributors say the new behaviour is a regression.  Their
 suggestion is to preserve backwards compatibility, while still allowing
 the new behaviour.

 Juanma Barranquero says:
   In fact, it'd be better if GHC/GHCi would do what Emacs on Windows
   does: use HOME if defined, else use ShGetFolderPath to find the
   Windows-defined "home directory".

 Yitzchak Gale says:
   %HOMEPATH% is *not* the usual Windows native way of finding a place for
 files like dot-ghci.
   Note that the old cmd.exe shell itself is deprecated on Vista - the new
 MSH shell is based on .NET.
   There I think you would use the IKnownFolders interface to get
 (something vagualy analagous to)
   the home directory, not %HOMEPATH%

   Also, %HOMEPATH% is unsuitable for a Unix-style home directory on pre-
 Vista systems, because it usually points to
   a directory with spaces in its path name.

   %HOME% is the de-facto standard for Unix-like shell applications that
 were ported to Windows and
   need a home directory. If someone sets that, it means they want to use
 the folder in that way. And
   yes, that is the way GHCi has been working until now, so I think it
 should still be supported if someone
   sets it.

   Otherwise, the native Windows way is via ShGetFolderPath on pre-Vista,
 and ShGetKnownFolder on Vista.
   The installer should create a GHC subfolder of that, and that is where
 dot-ghci should go on Windows,
   unless %HOME% is set.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1838#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to