union: fix poll-interval not working - fixes #2837

Before this change the union remote was using whether the writable
union could poll for changes to decide whether the union mount could
poll for changes.

The fix causes the union backend to signal it can poll for changes if
**any** of the remotes can poll for changes.
This commit is contained in:
Nick Craig-Wood 2018-12-13 11:22:40 +00:00
parent e317f04098
commit b26276b416

View File

@ -376,6 +376,11 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
}).Fill(f) }).Fill(f)
features = features.Mask(f.wr) // mask the features just on the writable fs features = features.Mask(f.wr) // mask the features just on the writable fs
// Really need the union of all remotes for these, so
// re-instate and calculate separately.
features.ChangeNotify = f.ChangeNotify
features.DirCacheFlush = f.DirCacheFlush
// FIXME maybe should be masking the bools here? // FIXME maybe should be masking the bools here?
// Clear ChangeNotify and DirCacheFlush if all are nil // Clear ChangeNotify and DirCacheFlush if all are nil