Skip to content

Conversation

Mino260806
Copy link

The current implementation of BaseSimpleActivity.movePathsInRecycleBin moves all the selections into the recycle bin, and then deletes them all at once.
Say the selected items have a total size of 5GB and available space on the device is 2GB, if all are moved to recycle bin at once, storage will be filled up and the app is going to crash.

Hence, I made it so that the app deletes the moved items whenever the remaining space is not enough...

Example

Current implementation

5GB size -> copy 5GB recycle bin -> crash (5GB > 1GB) delete the old 5GB from storage
❌ crash

Suggested implementation

5GB size -> copy 2GB recycle bin -> delete the old 2GB from storage
3GB size -> copy 2GB recycle bin -> delete the old 2GB from storage
1GB size -> copy 1GB recycle bin -> delete the old 1GB from storage
✔ success

Affected issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant