acd_cli icon indicating copy to clipboard operation
acd_cli copied to clipboard

Added Parameter to Remove Extraneous Files on Upload

Open sthm opened this issue 10 years ago • 12 comments

This commit adds two parameters (--delete, --delete-excluded) to the upload command. When specified, files that have been removed locally will be removed (more precisely will be moved to the trash) on the server as well.

This functionality is usefull to keep local and remote conent in sync. It mimics the behaviour of the respective rsync commands.

sthm avatar Nov 26 '15 14:11 sthm

@sthm :+1: I just came to the repo to see if this was a future feature request and found this PR! awesome!

I think this is actually the same request as #86?

stevenolen avatar Nov 26 '15 20:11 stevenolen

Glad you like it!

It indeed seems to be related to the feature request you've mentioned. I wasn't aware of it, though, I just happened to have some free time and was missing the feature from the cli ;)

Regards, Steffen

On November 26, 2015 9:00:20 PM GMT+01:00, Steve Nolen [email protected] wrote:

@sthm :+1: I just came to the repo to see if this was a future feature request and found this PR! awesome!

I think this is actually the same request as #86?


Reply to this email directly or view it on GitHub: https://github.com/yadayada/acd_cli/pull/202#issuecomment-159986552

sthm avatar Nov 27 '15 07:11 sthm

Two things:

  1. This kind of deletion will trash nodes that are also hard-linked to other parents, effectively removing them from multiple folders. I know ACDFuse does the same, but the CLI part of acd_cli still respects multi-parent nodes AFAIR.
  2. Would you kindly add these options to the download action, too?

yadayada avatar Nov 27 '15 16:11 yadayada

@sthm :+1: great feature

ondrejbima avatar Dec 01 '15 11:12 ondrejbima

  1. The same mechanism is used by trash_action and remove_child_action. I'm happy to change this behavior, if you point me to some code that I can use instead.
  2. Sure! Is there some way I can add the commit to this pull request or do I need to open a new one?

sthm avatar Dec 02 '15 19:12 sthm

  1. I meant that it should be checked whether the node has a single parent or not. If it has a) a single parent, the node may be safely trashed, and if it has b) multiple parents, it should be removed from the particular parent only.
  2. The pull request refers to the HEAD of your branch, so it should auto-update if you make a new commit to sthm:master, hopefully.

yadayada avatar Dec 02 '15 23:12 yadayada

Nice feature to add :+1:

JigSawFr avatar Dec 08 '15 14:12 JigSawFr

I had a need for this functionality as well and found this PR. Since it wasn't merged, I tried my hand at applying the diff to the current head of master but found the changes were no longer compatible due to the changes to "rework NodeCache" (commit 8997b8c3697d1f7b2b31f3c0bb4150004eb1e321). I took a shot at making the necessary changes and they seem to work ok, at least with my data. I don't claim total understanding of all the dependent code, though, so it could surely use a look from someone more familiar with the code base. If anyone wants to advance this work, feel free to use what I've got at https://github.com/philrz/acd_cli as a basis.

philrz avatar Mar 22 '16 01:03 philrz

Any update on this being merged? It is a feature that would be immensely helpful with my environment.

HeroCC avatar May 15 '16 16:05 HeroCC

Please merge it.

deeperton avatar Jul 11 '16 04:07 deeperton

Waaaaant

gryphonmyers avatar Dec 09 '16 20:12 gryphonmyers

I would love to see this merged. Having deleted files put into the trash would be awesome, as I currently back up photos from my FreeNAS appliance to Prime Photos using acd_cli.

k4kfh avatar Feb 26 '17 05:02 k4kfh