Unexpected change in "--min-age/--max-age" behavior in v1.40

The behavior when using --min-age and --max-age in the same command seems to be broken in v1.40 (vs v1.39 and prior).

Example command:

rclone --dry-run --checksum --delete-excluded --min-age 2d --max-age 3d --dump filters --transfers=16 --checkers=16 copy /mnt/media/stuff/ gdrive:media/stuff/

Output v1.39:

— start filters —
Last-modified date must be equal or greater than: 2018-04-20 02:00:02.663184174 -0500 CDT m=-259199.990530752
Last-modified date must be equal or less than: 2018-04-21 02:00:02.663183045 -0500 CDT m=-172799.990531830
— File filter rules —
— Directory filter rules —
— end filters —

Output v1.40:

2018/04/23 12:59:59 filter: --min-age can’t be larger than --max-age

I believe this is a common use case to be able to only include files modified in a range between two dates (i.e. > 2018-04-20 and < 2018-04-22) in the copy/sync command but now this seems to be impossible to accomplish.

Any advice/help is greatly appreciated.

I am also using --min-age --max-age and I am receiving the same error. This kind of borks my scripted syncing.

How do I setup a file modification range for sync in v1.40?

Oh that is a bug. I thought I’d replied to this post, but must have got distracted…

It turns out that the condition got swapped around in the big code re-suffle I did for v1.40. I have no idea how that happened!

I’ve fixed that here:

https://beta.rclone.org/v1.40-123-g76444006/ (uploaded in 15-30 mins)

This will be in the latest beta from now on and in 1.41.

Thanks for bringing this to my attention!

@ncw

Thanks for the quick turnaround! Latest beta works as expected.

1 Like