logo       

[ ghc-Bugs-806633 ] doesDirectoryExist "/" ==> False: msg#00055

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-806633 ] doesDirectoryExist "/" ==> False

Bugs item #806633, was opened at 2003-09-15 09:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=806633&group_id=8032

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: doesDirectoryExist "/" ==> False

Initial Comment:
doesDirectoryExist gives False when called with root dir, "/".

I think that the following patch corrects this (I have not tried yet):

$ diff -u Directory.hs,orig Directory.hs
--- Directory.hs,orig 2003-04-11 12:11:24.000000000 +0200
+++ Directory.hs 2003-09-15 18:22:56.000000000 +0200
@@ -597,7 +597,7 @@

fileNameEndClean :: String -> String
fileNameEndClean name =
- if i >= 0 && (ec == '\' || ec == '/') then
+ if i > 0 && (ec == '\' || ec == '/') then
fileNameEndClean (take i name)
else
name


vbzoli@xxxxxxx


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=806633&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise