5d75cbcdcf
box.com already had a special case, since its renaming was known buggy. In its case, renaming to the temp file succeeds, but then renaming the temp file to final destination fails. Then this 4shared server has buggy handling of renames across directories. While already worked around with for the temp files when storing exports now being in the same directory as the final filename, that also affected renameExport when the file moves between directories. I'm not entirely clear what happens on the 4shared server when it fails this way. It kind of looks like it may rename the file to destination and then still fail. To handle both, when rename fails, delete both the source and the destination, and fall back to uploading the content again. In the box.com case, the temp file is the source, and deleting it makes sure the temp file gets cleaned up. In the 4shared case, the file may have been renamed to the destination and so cleaning that up avoids any interference with the re-upload to the destination. |
||
---|---|---|
.. | ||
Directory | ||
External | ||
Helper | ||
List | ||
Rsync | ||
WebDAV | ||
Adb.hs | ||
BitTorrent.hs | ||
Borg.hs | ||
Bup.hs | ||
Ddar.hs | ||
Directory.hs | ||
External.hs | ||
GCrypt.hs | ||
Git.hs | ||
GitLFS.hs | ||
Glacier.hs | ||
Hook.hs | ||
HttpAlso.hs | ||
List.hs | ||
P2P.hs | ||
Rsync.hs | ||
S3.hs | ||
Tahoe.hs | ||
Web.hs | ||
WebDAV.hs |