acd_cli
acd_cli copied to clipboard
Added Parameter to Remove Extraneous Files on Upload
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 :+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?
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
Two things:
- 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.
- Would you kindly add these options to the download action, too?
@sthm :+1: great feature
- 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.
- Sure! Is there some way I can add the commit to this pull request or do I need to open a new one?
- 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.
- 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.
Nice feature to add :+1:
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.
Any update on this being merged? It is a feature that would be immensely helpful with my environment.
Please merge it.
Waaaaant
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.