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
F2752911: D7583.id25588.diff
Wed, Sep 18, 4:29 PM
F2752486: D7583.id25603.diff
Wed, Sep 18, 4:02 PM
Unknown Object (File)
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)
Aug 17 2024, 4:14 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