fix relaxed with existing file

This commit is contained in:
Joey Hess 2013-03-12 15:58:36 -04:00
parent 1533692cce
commit 70b7555eaf
2 changed files with 16 additions and 10 deletions

View file

@ -60,7 +60,11 @@ perform relaxed url file = ifAnnexed file addurl geturl
liftIO $ createDirectoryIfMissing True (parentDir file) liftIO $ createDirectoryIfMissing True (parentDir file)
ifM (Annex.getState Annex.fast <||> pure relaxed) ifM (Annex.getState Annex.fast <||> pure relaxed)
( nodownload relaxed url file , download url file ) ( nodownload relaxed url file , download url file )
addurl (key, _backend) = do addurl (key, _backend)
| relaxed = do
setUrlPresent key url
next $ return True
| otherwise = do
headers <- getHttpHeaders headers <- getHttpHeaders
ifM (liftIO $ Url.check url headers $ keySize key) ifM (liftIO $ Url.check url headers $ keySize key)
( do ( do

View file

@ -22,3 +22,5 @@ Debian Sid
supported repository versions: 3 4 supported repository versions: 3 4
upgrade supported from repository versions: 0 1 2 upgrade supported from repository versions: 0 1 2
build flags: Assistant Webapp Pairing Testsuite S3 WebDAV Inotify DBus XMPP DNS build flags: Assistant Webapp Pairing Testsuite S3 WebDAV Inotify DBus XMPP DNS
> Missed the case of adding an url to an existing file. [[done]] --[[Joey]]