New submission from Toni Timonen <[EMAIL PROTECTED]>:

Hi,

Accessing of a repository located in some path fails when current working
directory is "/".

Steps to reproduce:
[EMAIL PROTECTED]:/tmp$ darcs changes --repo=/work/ttimonen/c/dng > /dev/null
[EMAIL PROTECTED]:/tmp$ cd ..
[EMAIL PROTECTED]:/$ darcs changes --repo=/work/ttimonen/c/dng > /dev/null

Fail: : setCurrentDirectory: does not exist (No such file or directory)

[EMAIL PROTECTED]:/$ 



A patch included.

----------
files: repoaccess.patch
messages: 410
nosy: droundy, tommy, ttimonen
priority: bug
status: unread
title: "darcs changes --repo=/foo/bar" shouldn't fail if cwd is root(/)
topic: Patch

____________________________________
Darcs issue tracker <[EMAIL PROTECTED]>
<http://bugs.darcs.net/issue106>
____________________________________
--- orig/Repository.lhs	2006-01-13 17:34:03.000000000 +0200
+++ new/Repository.lhs	2006-01-20 19:42:05.000000000 +0200
@@ -136,8 +136,10 @@
                  if cd' /= cd
                      then findRepository' $
                          reverse (takeWhile (/='/') $ reverse cd)///dir
-                     else do setCurrentDirectory dir
+                     else if dir /= ""
+                         then do setCurrentDirectory dir
                              return $ Right ""
+                         else return $ Right ""
 
 (///) :: FilePath -> FilePath -> FilePath
 "" /// b = b
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to