webdav: Changed path used on webdav server for temporary files.
Done to avoid a "tmp" directory appearing in webdav exports. Also affects non-export webdav remotes, so interrupted uploads using the old path will not overwrite it. However, PUT is quite likely to be implemented atomically on web servers anyway, so I doubt this will cause problems.
This commit is contained in:
parent
1223960294
commit
cf51f40f0e
3 changed files with 8 additions and 10 deletions
|
@ -46,18 +46,15 @@ keyDir k = addTrailingPathSeparator $ hashdir </> keyFile k
|
|||
keyLocation :: Key -> DavLocation
|
||||
keyLocation k = keyDir k ++ keyFile k
|
||||
|
||||
exportLocation :: ExportLocation -> DavLocation
|
||||
exportLocation (ExportLocation f) = f
|
||||
|
||||
{- Where we store temporary data for a key as it's being uploaded. -}
|
||||
keyTmpLocation :: Key -> DavLocation
|
||||
keyTmpLocation = tmpLocation . keyFile
|
||||
|
||||
exportLocation :: ExportLocation -> DavLocation
|
||||
exportLocation (ExportLocation f) = f
|
||||
|
||||
tmpLocation :: FilePath -> DavLocation
|
||||
tmpLocation f = tmpDir </> f
|
||||
|
||||
tmpDir :: DavLocation
|
||||
tmpDir = "tmp"
|
||||
tmpLocation f = "git-annex-webdav-tmp-" ++ f
|
||||
|
||||
locationParent :: String -> Maybe String
|
||||
locationParent loc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue