fileManagerPrivate.addFileWatch() does not notify the specific changed file(s) |
|||||||||
Issue descriptionChrome Version: 69 ToT Chrome OS Version: 69 ToT We discovered that fileManagerPrivate.addFileWatch() does not notify the specific changed file(s) when we tried to add/delete a file under Downloads/. Specifically, it does not enter the if clause but enter the else clause (https://cs.chromium.org/chromium/src/ui/file_manager/file_manager/foreground/js/directory_model.js?type=cs&q=watcher-directory-changed+file:js&sq=package:chromium&g=0&l=284), which requires the camera app to re-scan the whole folder. Since file changes in Downloads/ are very frequent, it would cost a lot of overhead to re-scan the folder every time. Could we prioritize a fix in M69?
,
Jun 21 2018
Assigning to Sasha as the P.O.C. for the camera integration.
,
Jun 25 2018
Friendly ping.
,
Jun 26 2018
Sorry, I've been on vacation :) Let me take a look at this today.
,
Jun 27 2018
Sorry. I didn't set the priority correctly.
,
Jun 27 2018
Hi Sheng-Hao, Thanks for flagging this. With more investigation, I don't think we actually support adding per-file watchers in the Files app. We originally wanted this functionality for Recents, but in this case we scan at a timed interval to check for File changes. You my have to implement something similar for M69, and we can look into this again for M70+. Sasha
,
Jun 28 2018
Hi Sasha, We are not requesting for per-file watchers. We want to use the existing addFileWatch() for a directory. The problem is that it does not enter the if clause but enter the else clause (https://cs.chromium.org/chromium/src/ui/file_manager/file_manager/foreground/js/directory_model.js?type=cs&q=watcher-directory-changed+file:js&sq=package:chromium&g=0&l=284), which does not provide the specific changed files in callback. Could this be possibly addressed in M69?
,
Jun 28 2018
To quote mtomasz@ from the e-mail thread: "IIRC we only pass list of changed entries for Drive and FSP providers which support it. For Downloads we only know that something in the directory has changed. Maybe this is something which can be fixed, as according to [1] inotify should be able to provide us a list of changes. We use inotify for local files, including Downloads." [1] https://docs.google.com/document/d/1XNdO-oKq86NqDdlu4z94yx9OVwDFO0AsQAsUDGg25B0/edit#heading=h.2fupsrf8lwh6 AFAIK, all the infrustructure/APIs are already there, we'd just need to plumb it through. But the hard part might be investigating why this hasn't been done already for e.g. performance reasons? Sorry, but I'd say out of scope for M69. Can you still get the functionality you need for Camera app without it?
,
Jul 9
Moving to P2 for M69.
,
Jul 24
,
Aug 15
,
Oct 4
,
Oct 5
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by shenghao@chromium.org
, Jun 20 2018