Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some support for rename on case insensitive local filesystems #40935

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

icewind1991
Copy link
Member

@icewind1991 icewind1991 commented Oct 16, 2023

Add some logic for handling case insensitive filesystems when localstorage.case_insensitive is set.

This adds a bunch of overhead as file_exists now needs to read the directory content to perform the case sensitive compare.

With my local testing (case insensitive zfs), the rename('foo', 'Foo') call returns true but doesn't actually change the on-disk name, so an additional check is added that the name has actually changed. So the rename fails but at least doesn't cause a filecache desync.

@icewind1991
Copy link
Member Author

Note that having proper support for case insensitive file systems is a significant amount of work

@sorbaugh sorbaugh requested review from Altahrim and artonge October 16, 2023 15:56
@Altahrim
Copy link
Collaborator

Altahrim commented Oct 17, 2023

Tested on stable27 👍

I was able to reproduce the bug. It was fixed with configuration:

occ conf:sys:set localstorage.caseInsensitive --type bool --value=true

@juliusknorr juliusknorr self-requested a review October 17, 2023 09:21
@icewind1991 icewind1991 force-pushed the local-case-insensitive branch from 57718fb to b157e56 Compare October 20, 2023 12:55
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Oct 20, 2023
@icewind1991 icewind1991 added this to the Nextcloud 28 milestone Oct 20, 2023
@icewind1991 icewind1991 marked this pull request as ready for review October 20, 2023 12:56
lib/private/Files/Storage/Local.php Outdated Show resolved Hide resolved
lib/private/Files/Storage/Local.php Outdated Show resolved Hide resolved
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 force-pushed the local-case-insensitive branch from b157e56 to 8418fcf Compare October 20, 2023 13:03
@Altahrim
Copy link
Collaborator

/backport to stable27

@Altahrim
Copy link
Collaborator

/backport to stable26

@Altahrim Altahrim merged commit cb4e367 into master Nov 15, 2023
36 of 38 checks passed
@Altahrim Altahrim deleted the local-case-insensitive branch November 15, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants