[darcs-devel] [issue2249] findRepository has a bogus-looking case when given a file, not directory
Owen Stephens
bugs at darcs.net
Mon Oct 1 01:04:44 UTC 2012
New submission from Owen Stephens <darcs at owenstephens.co.uk>:
src/Darcs/Repository/Internal.hs line~397:
findRepository :: WorkRepo -> IO (Either String ())
findRepository (WorkRepoURL d) | isFile d =
do setCurrentDirectory d `catchall` fail ("can't set directory
to "++d)
findRepository WorkRepoCurrentDir
findRepository (WorkRepoDir d) =
do setCurrentDirectory d `catchall` fail ("can't set directory
to "++d)
findRepository WorkRepoCurrentDir
findRepository _ = maybe (Right ()) id <$> seekRepo
that first case (with the guard) looks stupid - C&P? It should
presumably just fail, since a repo can't be "in" a file...
I'm in the middle of a de-lint session, so recording this for later
----------
messages: 16193
nosy: jaredj, owst
status: unknown
title: findRepository has a bogus-looking case when given a file, not directory
topic: ProbablyEasy
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2249>
__________________________________
More information about the darcs-devel
mailing list