zhanghai / zhanghai/MaterialFiles

File Renaming Does Not Work When Changing Case Of Existing Characters Of The Filename?

Open
#1,208 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
9k
Forks
736
PR merge metrics
No merged PRs in 30d

Description

This problem obviously makes things difficult when trying to rename files/folders. This functionality is essential if the underlying file system is case sensitive but even is the file system isn't case sensitive you may still want to rename a file for display/reading purposes.

Reproduce:
From within Material Files create a file called "test.txt". Then try to rename to "Test.txt" and the rename is not carried out (note the difference of lower and upper case "T").

Workaround:
Rename the file to "TTest.txt" and then to "Test.txt" (adding an extra character and then removing it forces the rename to happen).

Solution:
Guessing here but the check to detect if the rename should be performed should be changed to case sensitive?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the case-only rename in Material Files by changing “test.txt” to “Test.txt”, then trace the file-renaming path and its check for whether a rename is needed. Done means renaming existing files or folders when only character case changes, without requiring the temporary-name workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.