addurl: --fast can be used to avoid immediately downloading the url.

The tricky part about this is that to generate a key, the file must be
present already. Worked around by adding (back) an URL key type, which
is used for addurl --fast.
This commit is contained in:
Joey Hess 2011-08-06 14:57:22 -04:00
parent dd8e649f49
commit dede05171b
7 changed files with 65 additions and 19 deletions

View file

@ -72,7 +72,7 @@ perform file oldkey newbackend = do
then do
-- Update symlink to use the new key.
liftIO $ removeFile file
next $ Command.Add.cleanup file newkey
next $ Command.Add.cleanup file newkey True
else stop
where
cleantmp t = whenM (doesFileExist t) $ removeFile t