Skip to content
Snippets Groups Projects

MediaLibrarySerivce: Remove .Trash on each foreground notification

Merged Soomin Lee requested to merge bubu/vlc-ios:newui/files/deletion/space/init into master

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)

Edited by Soomin Lee

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Soomin Lee changed milestone to %3.2.0

    changed milestone to %3.2.0

  • Soomin Lee added 1 commit

    added 1 commit

    • d8b9f6e9 - MediaLibrarySerivce: Remove .Trash on each foreground notification

    Compare with previous version

  • Soomin Lee changed the description

    changed the description

  • First, deleting this folder every time the app is launched should be sufficient to mitigate the storage issue.

    However, the fact that you have to do this is not normal at all. Did you file a radar or discuss with someone on the internet familiar with the issue?

  • Author Maintainer

    First, deleting this folder every time the app is launched should be sufficient to mitigate the storage issue.

    This won't reflect the changes if the user deletes in Files and comes back to VLC. If we do this, wouldn't that mean the user needs to kill the app each time?

  • Why would the user need to kill the app because s/he deleted a file? VLC should notice if a file disappears while it is not in the foreground like you could always remove or add media using iTunes while the app is not running.

  • Author Maintainer

    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.

  • Author Maintainer

    At least that is the behaviour that I've noticed.

  • 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.

  • Author Maintainer

    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

    Compare with previous version

Please register or sign in to reply
Loading