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.
This commit is contained in:
Joey Hess 2017-09-15 13:15:47 -04:00
parent 78a67f29f8
commit 9f4ffe65e9
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 156 additions and 87 deletions

View file

@ -32,8 +32,9 @@ instance HasExportUnsupported (Annex (ExportActions Annex)) where
warning "store export is unsupported"
return False
, retrieveExport = \_ _ _ _ -> return False
, removeExport = \_ _ -> return False
, checkPresentExport = \_ _ -> return False
, removeExport = \_ _ -> return False
, removeExportDirectory = Just $ \_ -> return False
, renameExport = \_ _ _ -> return False
}