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

@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

@juliushaertl juliushaertl self-requested a review October 17, 2023 09:21
@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>
@Altahrim
Copy link
Collaborator

/backport to stable27

@Altahrim
Copy link
Collaborator

/backport to stable26

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.

None yet

4 participants