mirror of
https://github.com/rclone/rclone.git
synced 2025-08-19 01:46:31 +02:00
config: make parsing of duration options consistent
All user visible Durations should be fs.Duration rather than time.Duration. Suffix is then optional and defaults to s. Additional suffices d, w, M and y are supported, in addition to ms, s, m and h - which are the only ones supported by time.Duration. Absolute times can also be specified, and will be interpreted as duration relative to now.
This commit is contained in:
@@ -79,7 +79,7 @@ func Start(ctx context.Context, facility string, f fs.Fs) (*DB, error) {
|
||||
}
|
||||
|
||||
name := makeName(facility, f)
|
||||
lockTime := fs.GetConfig(ctx).KvLockTime
|
||||
lockTime := time.Duration(fs.GetConfig(ctx).KvLockTime)
|
||||
|
||||
db := &DB{
|
||||
name: name,
|
||||
|
Reference in New Issue
Block a user