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)
Tue, Nov 5, 2:10 AM
Unknown Object (File)
Oct 7 2024, 2:08 PM
Unknown Object (File)
Oct 3 2024, 5:42 AM
Unknown Object (File)
Oct 2 2024, 12:30 AM
Unknown Object (File)
Sep 18 2024, 4:29 PM
Unknown Object (File)
Sep 18 2024, 4:02 PM
Unknown Object (File)
Sep 16 2024, 2:13 AM
Unknown Object (File)
Sep 10 2024, 2: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
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