export tree: avoid confusing output about renaming files
authorJoey Hess <joeyh@joeyh.name>
Sat, 9 Mar 2024 17:37:51 +0000 (13:37 -0400)
committerJoey Hess <joeyh@joeyh.name>
Sat, 9 Mar 2024 17:50:26 +0000 (13:50 -0400)
commit7cef5e8f35d211f09eee0af5f8ea0bf689a1d012
tree63678560d75f2b9d3308bd1ebae35cc0f493bfbb
parent0fb551053b000ae74aeee0dfb6d1cd70276f4334
export tree: avoid confusing output about renaming files

When a file in the export is renamed, and the remote's renameExport
returned Nothing, renaming to the temp file would first say it was
renaming, and appear to succeed, but actually what it did was delete the
file. Then renaming from the temp file would not do anything, since the
temp file is not present on the remote. This appeared as if a file got
renamed to a temp file and left there.

Note that exporttree=yes importree=yes remotes have their usual
renameExport replaced with one that returns Nothing. (For reasons
explained in Remote.Helper.ExportImport.) So this happened
even with remotes that support renameExport.

Fix by letting renameExport = Nothing when it's not supported at all.
This avoids displaying the rename.

Sponsored-by: Graham Spencer on Patreon
Command/Export.hs
Remote/Adb.hs
Remote/Directory.hs
Remote/External.hs
Remote/Helper/ExportImport.hs
Remote/Helper/ReadOnly.hs
Remote/Rsync.hs
Remote/S3.hs
Remote/WebDAV.hs
Types/Remote.hs