doc: fslist1 "watch" option is true by default
This is not completely obvious, and one of our components even got it wrong. But src/bridge/cockpitfslist.c implements it that way, and several of our pages rely on it. Also fix the default in the Python bridge.
This commit is contained in:
parent
1a969348dd
commit
7ef8a2cc04
|
@ -867,7 +867,7 @@ The following options can be specified in the "open" control message:
|
|||
* "path": The path name of the directory to watch. This should be an
|
||||
absolute path.
|
||||
* "watch": Boolean, when true the directory will be watched and signal
|
||||
on changes.
|
||||
on changes. Defaults to "true"
|
||||
|
||||
The channel will send a number of JSON messages that list the current
|
||||
content of the directory. These messages have a "event" field with
|
||||
|
|
|
@ -63,7 +63,7 @@ class FsListChannel(Channel):
|
|||
|
||||
def do_open(self, options):
|
||||
path = options.get('path')
|
||||
watch = options.get('watch')
|
||||
watch = options.get('watch', True)
|
||||
|
||||
for entry in os.scandir(path):
|
||||
self.send_entry("present", entry)
|
||||
|
|
Loading…
Reference in New Issue