convert checkAvailable to use availability rather than localpath
Every remote that sets localpath also implements an availability that reutrns Unavailable when a local directory is not available. This makes external remotes, and others that get support for availability Unavailable to be used by checkAvailable. (Which is only used by the assistant.) Had to keep localpath though, since other parts of the assistant use it to eg, sync with a remote when a removable drive is plugged in. Sponsored-by: Jack Hill on Patreon
This commit is contained in:
parent
7aac60769a
commit
83056e7b53
5 changed files with 11 additions and 8 deletions
|
@ -56,7 +56,7 @@ handleRemoteProblem urlrenderer rmt = do
|
|||
handleRemoteProblem' :: Git.Repo -> UrlRenderer -> Remote -> Assistant Bool
|
||||
handleRemoteProblem' repo urlrenderer rmt
|
||||
| Git.repoIsLocal repo && not (Git.repoIsLocalUnknown repo) =
|
||||
ifM (liftIO $ checkAvailable True rmt)
|
||||
ifM (liftAnnex $ checkAvailable True rmt)
|
||||
( do
|
||||
fixedlocks <- repairStaleGitLocks repo
|
||||
fsckresults <- showFscking urlrenderer (Just rmt) $ tryNonAsync $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue