MediaLibrarySerivce: Remove .Trash on each foreground notification
On each foreground notification we check if there is a .Trash
folder which is invisible for the user that can be created by deleting media from the Files app.
This could lead to disk space issues.
For now since we do not handle restoration, we delete the .Trash
folder every time.
Closes #656 (closed)
Merge request reports
Activity
changed milestone to %3.2.0
added MediaLibrary label
added 1 commit
- d8b9f6e9 - MediaLibrarySerivce: Remove .Trash on each foreground notification
The issue here is that when deleting files through the Files app, it doesn't remove it, it moves it to the trash folder(probably with something like this?). Therefore, creating a
.Trash
folder inside the users/Documents
.OK, but shouldn't it be the OS' obligation to take the bin out? There is a similar concept on the Mac where all media is moved to .Trashes when "deleting" and then you need to empty the trash.
On iOS, there is "Recently removed media" which can still be restored by the user within the Files app, so it appears to be expected behavior that you can do so, which implies that the data isn't immediately gone. Probably, the OS empties that folder from time to time or when storage pressure occurs.
Probably, the OS empties that folder from time to time or when storage pressure occurs.
It could be indeed, but when we tested it out with @Corbax, it didn't seem that it was cleaned automatically.
So unless we want to handle file restoration, which isn't planned for now. I believe cleaning it ourself even just to be sure, doesn't seem that bad as a solution.
added 6 commits
-
d8b9f6e9...4ad0f63f - 5 commits from branch
videolan:master
- 566b8c09 - MediaLibrarySerivce: Remove .Trash on each foreground notification
-
d8b9f6e9...4ad0f63f - 5 commits from branch