Skip to content

Allow case-only renames on case-insensitive filesystems - #95

Open
dualfroz wants to merge 1 commit into
linuxmint:masterfrom
dualfroz:fix/89-case-only-rename
Open

dualfroz wants to merge 1 commit into
linuxmint:masterfrom
dualfroz:fix/89-case-only-rename

Conversation

@dualfroz

Copy link
Copy Markdown

on case-insensitive filesystems (vfat, smb shares, cifs mounts) changing only the case of a name failed with "filename already exists", since set_display_name sees the new name as an existing file. when a case-only rename hits G_IO_ERROR_EXISTS it now goes through a temporary name, and if the new name turns out to be a different file (case-sensitive fs with both a.txt and A.txt) it puts the original name back and still shows the error. tested on a vfat image, Title Case works there now and should be the same for the TrueNAS share from #89

On vfat, SMB shares and other case-insensitive filesystems the new name
of a case-only change already exists as far as the filesystem is
concerned, so set_display_name fails with G_IO_ERROR_EXISTS. When that
happens, rename through a temporary name, and restore the original name
if the new one really belongs to another file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant