initial export command

Very basic operation works, but of course this is only the beginning.

This commit was sponsored by Nick Daly on Patreon.
This commit is contained in:
Joey Hess 2017-08-29 14:58:38 -04:00
parent cca2764f91
commit 9f3630f4e0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 121 additions and 1 deletions

View file

@ -235,7 +235,7 @@ exportPath d (ExportLocation loc) = d </> loc
storeExportDirectory :: FilePath -> FilePath -> Key -> ExportLocation -> MeterUpdate -> Annex Bool
storeExportDirectory d src _k loc p = liftIO $ catchBoolIO $ do
createDirectoryIfMissing True dest
createDirectoryIfMissing True (takeDirectory dest)
withMeteredFile src p (L.writeFile dest)
return True
where