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

SourceForge.net noreply at sourceforge.net
Mon Sep 15 12:35:40 EDT 2003


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 at vbzo.li 
 

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

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


More information about the Glasgow-haskell-bugs mailing list