aboutsummaryrefslogtreecommitdiff
path: root/doc/special_remotes
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-09-15 13:15:47 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-09-15 13:18:21 -0400
commit269c6925ded8145aaea1f8ccdbb747f65f076131 (patch)
tree53baca2cb95215158d98e008614f4e7ab5e79e95 /doc/special_remotes
parent1890f6ee7a791db909055b4760919e6979ddd3ae (diff)
implement removeExportDirectory
Not yet called by Command.Export. WebDAV needs this to clean up empty collections. Also, example.sh turned out to not be cleaning up directories when removing content from them, so it made sense for it to use this. Remote.Directory did not need it, and since its cleanup method for empty directories is more efficient than what Command.Export will need to do to find empty directories, it uses Nothing so that extra work can be avoided. This commit was sponsored by Thom May on Patreon.
Diffstat (limited to 'doc/special_remotes')
-rwxr-xr-xdoc/special_remotes/external/example.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/special_remotes/external/example.sh b/doc/special_remotes/external/example.sh
index 81b4b6806..c7fb78c02 100755
--- a/doc/special_remotes/external/example.sh
+++ b/doc/special_remotes/external/example.sh
@@ -264,6 +264,15 @@ while read line; do
key="$2"
doremove "$key" "$exportlocation"
;;
+ REMOVEEXPORTDIRECTORY)
+ shift 1
+ dir="$@"
+ if [ ! -d "$dir" ] || rm -rf "$mydirectory/$dir"; then
+ echo REMOVEEXPORTDIRECTORY-SUCCESS
+ else
+ echo REMOVEEXPORTDIRECTORY-FAILURE
+ fi
+ ;;
RENAMEEXPORT)
key="$2"
shift 2