Filters yielding different results in linux and windows

This is the command in linux:
rclone copy local:Dropbox local:ftp --max-age 5d --include /**/*.mp*

Result:
It copies only the folders containing the .mp* files (and the files)

So i get:

  • dir1
  • dir1/dir2
  • dir1/dir2/.mp*

Windows command (using dropbox as the target):
rclone.exe copy local:C:/media dropb:media/files --max-age 5d --include /**/*.mp*

Result:
It copies all the folders including the ones containing the .mp* files, but also all the other folders (which are empty because the other files were filtered out)

So now i get:

  • dir1
  • dir4 (empty)
  • dir1/dir2
  • dir1/dir3 (empty)
  • dir1/dir5 (empty)
  • dir1/dir2/.mp*

Is this a bug? is it dropbox related? is there a way to get the same result in windows?

EDIT: it seems to be related to https://github.com/ncw/rclone/issues/1837 1.41 works as intended.

Did you use different versions of rclone? Which version did you use?

Can you try the latest beta?

Yes, i realized i was using 1.41 in linux and 1.42 in windows, is there an option to decide the behaivor in the beta?

I think copying the empty folders is a consequence of rclone trying harder to preserve empty directories.

I guess we could do a flag not to preserve empty directories, or we could try to work out whether a directory was empty before filtering or not…

I think a flag might be the best idea, since some people might want to have the empty directories copied.

Can you please make a new issue on github about this and we can discuss there - thanks!

Done https://github.com/ncw/rclone/issues/2404

1 Like