webapp: Filter out from Switch Repository list any repositories listed in autostart file that don't have a git directory anymore.
Trying to start in such a repo will, obviously, fail. Note that assistant --autostart will try to start in such a repo, and fail, but does start successfully in the other autostart repos.
This commit is contained in:
parent
fb2a38963f
commit
1681386b0d
2 changed files with 6 additions and 1 deletions
|
@ -25,10 +25,12 @@ listOtherRepos :: IO [(String, String)]
|
|||
listOtherRepos = do
|
||||
dirs <- readAutoStartFile
|
||||
pwd <- getCurrentDirectory
|
||||
gooddirs <- filterM doesDirectoryExist $
|
||||
gooddirs <- filterM isrepo $
|
||||
filter (\d -> not $ d `dirContains` pwd) dirs
|
||||
names <- mapM relHome gooddirs
|
||||
return $ sort $ zip names gooddirs
|
||||
where
|
||||
isrepo d = doesDirectoryExist (d </> ".git")
|
||||
|
||||
getSwitchToRepositoryR :: FilePath -> Handler Html
|
||||
getSwitchToRepositoryR repo = do
|
||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -1,6 +1,9 @@
|
|||
git-annex (5.20140228) UNRELEASED; urgency=medium
|
||||
|
||||
* Probe for quvi version at run time.
|
||||
* webapp: Filter out from Switch Repository list any
|
||||
repositories listed in autostart file that don't have a
|
||||
git directory anymore.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 28 Feb 2014 14:52:15 -0400
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue