downloadUrl listfailedurls k p iv urls file uo =
-- Poll the file to handle configurations where an external
-- download command is used.
- meteredFile file (Just p) k (go urls [])
+ meteredFile (toRawFilePath file) (Just p) k (go urls [])
where
go (u:us) errs p' = Url.download' p' iv u file uo >>= \case
Right () -> return True
)
)
where
- docopycow = watchFileSize dest meterupdate $ const $
+ docopycow = watchFileSize dest' meterupdate $ const $
copyCoW CopyTimeStamps src dest
dest' = toRawFilePath dest
minratelimit = min consoleratelimit jsonratelimit
{- Poll file size to display meter. -}
-meteredFile :: FilePath -> Maybe MeterUpdate -> Key -> (MeterUpdate -> Annex a) -> Annex a
+meteredFile :: RawFilePath -> Maybe MeterUpdate -> Key -> (MeterUpdate -> Annex a) -> Annex a
meteredFile file combinemeterupdate key a =
metered combinemeterupdate key Nothing $ \_ p ->
watchFileSize file p a
-}
watchFileSize
:: (MonadIO m, MonadMask m)
- => FilePath
+ => RawFilePath
-> MeterUpdate
-> (MeterUpdate -> m a)
-> m a
p' sz
watcher p' sz
getsz = catchDefaultIO zeroBytesProcessed $
- toBytesProcessed <$> getFileSize f'
- f' = toRawFilePath f
+ toBytesProcessed <$> getFileSize f
meterupdate sizevar preventbacktracking n
| preventbacktracking = do