TeamAmaze / TeamAmaze/AmazeFileManager
NOT fully overwrite files when copy
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 6.4k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
Describe the bug
Recently I found AFM not work as expected when copy some plain text files, the contents in the copied file seem not fully overwritten. In my case, I copy the src file foo.txt to annother folder, which contains a the dest file named foo.txt as well. Both two txt files have diffrent text contents. When I excute the copy-paste action and then click overwrite button in the paste confirm dialog, the job finish without any exception. But when I open the copied txt file(the new dest txt file that should be overwritten), I find the contents of both the src txt file and the dest txt file which before the overwrite.
To Reproduce
Steps to reproduce the behavior:
- Create a foo.txt in path /some-test-path-1 with content 'aaa';
- Create another foo.txt in path /some-test-path-2 with content 'bbbbbb';
- Copy the /some-test-path-1/foo.txt and then paste in folder /some-test-path-2, click 'overwrite' button in the next confirm dialog;
- Open the /some-test-path-2/foo.txt after the copy-paste job finish, then you will see weird content 'aaabbb' instead of 'aaa'
Expected behavior
The original file should be fully overwritten by the src file content. In the reproduce case above, that should be 'aaa'.
Screenshots
None
Smartphone (please complete the following information):
- Device: Google Pixel 5
- OS: Android 11
- Rooted: No
- Version: 3.6.5
Additional context
None
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the copy-and-overwrite flow on Android 11 with the described foo.txt contents, then trace the file-copy path used by the paste confirmation. Done means overwriting a longer destination file leaves exactly the source contents, with no trailing destination bytes.
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
- Clearly specified
- Newbie friendliness
- 45/100