retronx-team / mtp-server-nx

A MTP Server implementation for Nintendo Switch
Apache License 2.0
160 stars 15 forks source link

Files changed after being scanned are not updated in MTP context #9

Open ckurtz22 opened 5 years ago

ckurtz22 commented 5 years ago

Because the Switch does not have a system such as inotify to easily check for when files are updated, after a directory is originally scanned by MTP if anything in it's contents are changed by the Switch then this will not be reflected by the MTP context. A solution would be to check the contents of a directory any time MTP requests information about it, and not just the first time. Will need some thinking to figure out how to handle files that are no longer there, new files not in the context, and files that have changed properties (size, last modified, etc).