Repository navigation
Conversation
ncw
left a comment
There was a problem hiding this comment.
Very nice feature :-)
See inline for some comments.
|
Thank you @ncw! You are right, and also I just realized an additional problem: syncing In the meantime, I am downgrading this PR to "draft" until I have a chance to revise. |
|
Actually I think maybe I figured it out. See if I'm on the right track with this: b13626b Also, I think I found and fixed an existing bug in the process (I can break this into a separate commit if you prefer) The tests pass everywhere but windows -- I will try to debug the windows-specific issue. |
|
I added some comments! If you separate the fix into a new commit that would be perfect. Or a new PR. You could make a failing test case which you make pass with the fix. |
Before this change, changing the case of a file on a case insensitive remote would fatally panic when `--dry-run` was set, due to `moveOrCopyFile` attempting to access the non-existent `tmpObj` it (would normally have) created. After this change, the panic is avoided by skipping this step during a `--dry-run` (with the usual "skipped as --dry-run is set" log message.)
…4854 Before this change, a sync to a case insensitive dest (such as macOS / Windows) would not result in a matching filename if the source and dest had casing differences but were otherwise equal. For example, syncing `hello.txt` to `HELLO.txt` would result in the dest filename remaining `HELLO.txt`. Furthermore, `--local-case-sensitive` did not solve this, as it actually caused `HELLO.txt` to get deleted! After this change, `HELLO.txt` is renamed to `hello.txt` to match the source, only if the `--fix-case` flag is specified. (The old behavior remains the default.)
|
Fixed the windows-specific issue (for the record: it was this.) |
|
Closing as a dupe of #7410, which is now merged. |
What is the purpose of this change?
Before this change, a sync to a case insensitive dest (such as macOS / Windows) would not result in a matching filename if the source and dest had casing differences but were otherwise equal. For example, syncing
hello.txttoHELLO.txtwould result in the dest filename remainingHELLO.txt. Furthermore,--local-case-sensitivedid not solve this, as it actually causedHELLO.txtto get deleted!After this change,
HELLO.txtis renamed tohello.txtto match the source, only if the--fix-caseflag is specified. (The old behavior remains the default.)One question I have... should this maybe be the default? Can we think of a reason that the old behavior would be preferable?
Also note that this does not address the related issues regarding
dedupe, so perhaps #1133 or #2430 should be reopened.Was the change discussed in an issue or in the forum before?
Many times (but not by me 😄 )
Checklist