dropbox,ftp,onedrive,yandex: make --timeout 0 work properly

See: https://forum.rclone.org/t/an-issue-about-ftp-backend-in-2-different-systems/22551
This commit is contained in:
Nick Craig-Wood
2021-03-01 12:05:36 +00:00
parent 9cc8ff4dd4
commit 0ad38dd6fa
5 changed files with 14 additions and 6 deletions

View File

@@ -1269,7 +1269,7 @@ func (f *Fs) changeNotifyRunner(ctx context.Context, notifyFunc func(string, fs.
var res *files.ListFolderLongpollResult
// Dropbox sets a timeout range of 30 - 480
timeout := uint64(f.ci.Timeout / time.Second)
timeout := uint64(f.ci.TimeoutOrInfinite() / time.Second)
if timeout > 480 {
timeout = 480
}