Page MenuHomePhabricator

[native] Fix media-cache "directory not found" warnings
ClosedPublic

Authored by bartek on Apr 23 2023, 11:20 PM.
Tags
None
Referenced Files
F2714763: D7583.diff
Mon, Sep 16, 2:13 AM
Unknown Object (File)
Tue, Sep 10, 2:14 PM
Unknown Object (File)
Tue, Sep 10, 2:14 PM
Unknown Object (File)
Tue, Sep 10, 2:14 PM
Unknown Object (File)
Tue, Sep 10, 2:12 PM
Unknown Object (File)
Sat, Aug 17, 4:14 PM
Unknown Object (File)
Aug 8 2024, 9:32 AM
Unknown Object (File)
Jul 26 2024, 11:28 PM
Subscribers

Details

Summary

Fixes ENG-3620.

When clearing cache, removing an already removed directory would cause a warning to be logged. Also fixed one more place where a similiar warn could appear.

Test Plan

The easiest way to test this is to use the iOS Simulator:

  • Console-logged cache directory and opened its parent dir in Finder. Manually added some content there (it's also possible to simply open encrypted media).
  • Logged-out - observed the directory content being removed.
  • Logged in again. Manually deleted the dir in finder.
  • Logged out again - empty dir was created.

Diff Detail

Repository
rCOMM Comm
Branch
barthap/crash-fixes
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

native/media/media-cache.js
44–48

This wasn't causing actual warnings but could possibly do if pathFromURI returned null

This revision is now accepted and ready to land.Apr 24 2023, 5:45 AM