mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-22 12:06:00 +00:00
fs_query: watch only readable files
The fs_query component used to try watching all files it found resulting in errors on files that are not watchable. For some files, however, the watch- feature doesn't make sense as they are not readable (no content, no size). Now, fs_query will check first whether a file is readable and skip watching if it isn't. Ref #4032
This commit is contained in:
parent
6e900f147c
commit
3ed26e7bb2
@ -46,11 +46,16 @@ struct Fs_query::Watched_file
|
||||
|
||||
Node_rwx const _rwx;
|
||||
|
||||
Watcher _watcher;
|
||||
Constructible<Watcher> _watcher { };
|
||||
|
||||
Watched_file(Directory const &dir, File_content::Path name, Node_rwx rwx,
|
||||
Vfs::Watch_response_handler &handler)
|
||||
: _name(name), _rwx(rwx), _watcher(dir, name, handler) { }
|
||||
:
|
||||
_name(name), _rwx(rwx)
|
||||
{
|
||||
if (_rwx.readable)
|
||||
_watcher.construct(dir, name, handler);
|
||||
}
|
||||
|
||||
virtual ~Watched_file() { }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user