diff options
-rw-r--r-- | Remote.hs | 12 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 12 insertions, 3 deletions
@@ -168,13 +168,19 @@ prettyListUUIDs uuids = do prettyUUID :: UUID -> Annex String prettyUUID u = concat <$> prettyListUUIDs [u] -{- Gets the remote associated with a UUID. - - There's no associated remote when this is the UUID of the local repo. -} +{- Gets the remote associated with a UUID. -} remoteFromUUID :: UUID -> Annex (Maybe Remote) remoteFromUUID u = ifM ((==) u <$> getUUID) ( return Nothing - , Just . fromMaybe (error "Unknown UUID") . M.lookup u <$> remoteMap id + , do + maybe tryharder (return . Just) =<< findinmap ) + where + findinmap = M.lookup u <$> remoteMap id + {- Re-read remote list in case a new remote has popped up. -} + tryharder = do + void remoteListRefresh + findinmap {- Filters a list of remotes to ones that have the listed uuids. -} remotesWithUUID :: [Remote] -> [UUID] -> [Remote] diff --git a/debian/changelog b/debian/changelog index 1379ffc01..9fbeae0a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,9 @@ git-annex (4.20130921) UNRELEASED; urgency=low * Send a git-annex user-agent when downloading urls. Overridable with --user-agent option. (Not yet done for S3 or WebDAV due to limitations of libraries used.) + * webapp: Fixed a bug where when a new remote is added, one file + may fail to sync to or from it due to the transferrer process not + yet knowing about the new remote. -- Joey Hess <joeyh@debian.org> Sun, 22 Sep 2013 19:42:29 -0400 |