export to webdav

This basically works, but there's a bug when renaming a file that leaves
a .git-annex-temp-content-key file in the webdav store, that never gets
cleaned up.

Also, exporting files with spaces to box.com seems to fail; perhaps it
does not support it?

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2017-09-12 14:08:00 -04:00
parent 7ef9b7ef46
commit 4d3a464e83
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 120 additions and 56 deletions

View file

@ -11,6 +11,7 @@
module Remote.WebDAV.DavLocation where
import Types
import Types.Remote (ExportLocation(..))
import Annex.Locations
import Utility.Url (URLString)
#ifdef mingw32_HOST_OS
@ -46,6 +47,12 @@ keyLocation k = keyDir k ++ keyFile k
keyTmpLocation :: Key -> DavLocation
keyTmpLocation = tmpLocation . keyFile
exportLocation :: ExportLocation -> DavLocation
exportLocation (ExportLocation f) = f
exportTmpLocation :: ExportLocation -> DavLocation
exportTmpLocation (ExportLocation f) = tmpLocation f
tmpLocation :: FilePath -> DavLocation
tmpLocation f = tmpDir </> f