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
Unknown Object (File)
Sat, Aug 17, 4:14 PM
Unknown Object (File)
Thu, Aug 8, 9:32 AM
Unknown Object (File)
Jul 26 2024, 11:28 PM
Unknown Object (File)
Jul 19 2024, 4:14 AM
Unknown Object (File)
Jul 16 2024, 10:21 AM
Unknown Object (File)
Jul 16 2024, 10:21 AM
Unknown Object (File)
Jul 16 2024, 10:21 AM
Unknown Object (File)
Jul 16 2024, 10:18 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/media/media-cache.js
44–48 ↗(On Diff #25588)

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