addurl on an existing file that already has the url should succeed, not fail
This commit is contained in:
parent
f71862b593
commit
a941af0fe2
1 changed files with 3 additions and 4 deletions
|
@ -64,9 +64,8 @@ seek us = do
|
||||||
UrlContents sz mkf ->
|
UrlContents sz mkf ->
|
||||||
void $ commandAction $
|
void $ commandAction $
|
||||||
startRemote r relaxed optfile pathdepth url sz mkf
|
startRemote r relaxed optfile pathdepth url sz mkf
|
||||||
UrlNested l ->
|
UrlNested l -> forM_ l $
|
||||||
forM_ l $ \(url', c) ->
|
uncurry handlecontents
|
||||||
handlecontents url' c
|
|
||||||
res <- tryNonAsync $ maybe
|
res <- tryNonAsync $ maybe
|
||||||
(error "unable to checkUrl")
|
(error "unable to checkUrl")
|
||||||
(flip id u)
|
(flip id u)
|
||||||
|
@ -210,7 +209,7 @@ addUrlChecked relaxed url u checkexistssize key
|
||||||
setUrlPresent u key url
|
setUrlPresent u key url
|
||||||
next $ return True
|
next $ return True
|
||||||
| otherwise = ifM (elem url <$> getUrls key)
|
| otherwise = ifM (elem url <$> getUrls key)
|
||||||
( stop
|
( next $ return True -- nothing to do
|
||||||
, do
|
, do
|
||||||
(exists, samesize) <- checkexistssize key
|
(exists, samesize) <- checkexistssize key
|
||||||
if exists && samesize
|
if exists && samesize
|
||||||
|
|
Loading…
Reference in a new issue