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
This commit is contained in:
parent
0fb551053b
commit
7cef5e8f35
10 changed files with 23 additions and 23 deletions
|
@ -112,7 +112,7 @@ gen r u rc gc rs = do
|
|||
-- Not needed because removeExportLocation
|
||||
-- auto-removes empty directories.
|
||||
, removeExportDirectory = Nothing
|
||||
, renameExport = renameExportM dir
|
||||
, renameExport = Just $ renameExportM dir
|
||||
}
|
||||
, importActions = ImportActions
|
||||
{ listImportableContents = listImportableContentsM ii dir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue