git-annex/Remote
Joey Hess c633144d28
remove empty directories when removing from export
The subtle part of this is what happens when the remote fails to remove
an empty directory. The removal from the export needs to fail in that
case, so the removal will be tried again later. However, removeExportLocation
has already been run and changed the export db, so if the next run
checks getExportLocation, it might decide nothing remains to be done,
leaving the empty directory.

Dealt with that by making removeEmptyDirectories, handle a failure
by calling addExportLocation, reverting the database changes so the next
run will be guaranteed to try deleting the empty directory again.

This commit was sponsored by Thomas Hochstein on Patreon.
2017-09-15 15:22:53 -04:00
..
Directory remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
External implement removeExportDirectory 2017-09-15 13:18:21 -04:00
Helper remove empty directories when removing from export 2017-09-15 15:22:53 -04:00
Rsync adeiu, MissingH 2017-05-16 01:03:52 -04:00
WebDAV fix exporting files in subdirectories to webdav 2017-09-13 15:09:19 -04:00
BitTorrent.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Bup.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Ddar.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Directory.hs implement removeExportDirectory 2017-09-15 13:18:21 -04:00
External.hs add missing case 2017-09-15 14:32:56 -04:00
GCrypt.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Git.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Glacier.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Hook.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
List.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
P2P.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Rsync.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
S3.hs implement removeExportDirectory 2017-09-15 13:18:21 -04:00
Tahoe.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Web.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
WebDAV.hs implement removeExportDirectory 2017-09-15 13:18:21 -04:00