fix relaxed with existing file
This commit is contained in:
parent
1533692cce
commit
70b7555eaf
2 changed files with 16 additions and 10 deletions
|
@ -60,16 +60,20 @@ perform relaxed url file = ifAnnexed file addurl geturl
|
|||
liftIO $ createDirectoryIfMissing True (parentDir file)
|
||||
ifM (Annex.getState Annex.fast <||> pure relaxed)
|
||||
( nodownload relaxed url file , download url file )
|
||||
addurl (key, _backend) = do
|
||||
headers <- getHttpHeaders
|
||||
ifM (liftIO $ Url.check url headers $ keySize key)
|
||||
( do
|
||||
setUrlPresent key url
|
||||
next $ return True
|
||||
, do
|
||||
warning $ "failed to verify url: " ++ url
|
||||
stop
|
||||
)
|
||||
addurl (key, _backend)
|
||||
| relaxed = do
|
||||
setUrlPresent key url
|
||||
next $ return True
|
||||
| otherwise = do
|
||||
headers <- getHttpHeaders
|
||||
ifM (liftIO $ Url.check url headers $ keySize key)
|
||||
( do
|
||||
setUrlPresent key url
|
||||
next $ return True
|
||||
, do
|
||||
warning $ "failed to verify url: " ++ url
|
||||
stop
|
||||
)
|
||||
|
||||
download :: String -> FilePath -> CommandPerform
|
||||
download url file = do
|
||||
|
|
|
@ -22,3 +22,5 @@ Debian Sid
|
|||
supported repository versions: 3 4
|
||||
upgrade supported from repository versions: 0 1 2
|
||||
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]]
|
||||
|
|
Loading…
Reference in a new issue