vfs: do not print notice about missing poll-interval support when set to 0

Fixes #5359
This commit is contained in:
albertony 2021-05-28 11:41:30 +02:00
parent 22e86ce335
commit 0574ebf44a
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ backend. Changes made through the mount will appear immediately or
invalidate the cache.
--dir-cache-time duration Time to cache directory entries for. (default 5m0s)
--poll-interval duration Time to wait between polling for changes.
--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable. (default 1m0s)
However, changes made directly on the cloud storage by the web
interface or a different copy of rclone will only be picked up once

View File

@ -222,7 +222,7 @@ func New(f fs.Fs, opt *vfscommon.Options) *VFS {
vfs.pollChan = make(chan time.Duration)
do(context.TODO(), vfs.root.changeNotify, vfs.pollChan)
vfs.pollChan <- vfs.Opt.PollInterval
} else {
} else if vfs.Opt.PollInterval > 0 {
fs.Infof(f, "poll-interval is not supported by this remote")
}