mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-10-14 19:27:09 -04:00
* fix: keep Steam's directory listings on FUSE libraries Before it creates, moves or deletes a content file the Steam client lists the whole destination directory about ten times to match names case-insensitively. On Android's FUSE storage every listing goes through the media provider, so reserving space grew quadratically with the number of files: 33 minutes for Haunted Paws Demo (3,938 files) in a Games folder. The client's listings under steamapps/ on FUSE are now kept while the directory's stat is unchanged, for at most five seconds, and patched by the client's own creates, renames and removals. Other changes fail the stat check and the directory is read again. BL_NO_DIR_CACHE=1 turns it off. Haunted Paws Demo into the internal shared Games folder: reserving space 33m08s -> 25-52s, committing 6m15s -> 19-30s, install 39m50s -> 1m12s-1m51s. Internal storage is unchanged (5s reserve). * fix: drop stale directory listings on coarse-timestamp volumes NTFS reports whole-second directory times and a fixed size, so a change made outside the client's own calls could leave a cached listing stale. Listings now carry an inotify watch and are dropped on any event the client's own patched changes don't account for. A forked child stops caching, since it shares the parent's queue. Covers rewinddir, telldir and seekdir on cached listings, and directories opened by the fast-path preload's opendir, which goes through fdopendir.