drone-rsync icon indicating copy to clipboard operation
drone-rsync copied to clipboard

Recursive parameter is redundant

Open thegallagher opened this issue 6 years ago • 2 comments

The -r option doesn't do anything because you're using -a which implies -r.

From the rsync man page:

-a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)

This means you can either remove the recursive option (I don't think it would be used anyway), or you'll need to use -lptgoD instead of -a.

thegallagher avatar Apr 06 '18 07:04 thegallagher

Good find! If you're up for creating a PR I'd be happy to review it. If not, I don't think the -r option is causing any issues either, so it's not very high on the priority list.

mjwwit avatar Apr 21 '20 09:04 mjwwit

I can't remember what prompted me to open this issue. I probably should have left some better info.

There is two ways this could be fixed:

  1. Replace the -a with option with -lptgoD. In this case it might also make sense to make recursive the default since it's been working that way for a long time and would be a breaking change.
  2. Remove the recursive option and it's documentation.

I haven't used Drone for a while now, but if I or someone else does create a PR for this then we will know which direction to take it..

thegallagher avatar Apr 21 '20 12:04 thegallagher