Skip to content

rework of the semantics for rmobj

Liam Monahan requested to merge issue-43 into master

changes to rmobj semantics:

    * --interactive is no longer implied
    * --force now overrides --interactive
    * --recursive will now prompt once for deletion by default.  Of course,
      --interactive will override this and prompt for every file.
    * the exit status of the command is now more accurate and better reflects
      the behavior of rm.  For file-related errors (key, bucket does not exist or
      could not be deleted) the exit code will be 0 and no messages will be
      printed if --force is set.  Otherwise, errors and an exit status of 1 will
      be given.
    * delete_key() now accepts a check_key flag so that deletion attempts of
      non-existant keys doesn't fail silently.
    * refactor [yes/no] prompting out into a function.
    * changed the logic for 'is this a directory I am trying to delete' from
     naively checking if the key name given ends in a slash to adding the slash
     if it wasn't given and checking for said key existence.
    * updated rmobj manpage with these changes.

bugfixs:

    * rmobj -rf bucket:foo will now delete foo/* and not bucket:foobar/ because
      of the way keys were being listed and deleted without checking if the base
      key without the slash was a directory.

Fixes #43 (closed) Fixes #48 (closed)

Edited by Liam Monahan

Merge request reports