Implement the renaming feature in Ark

Review Request #120337 - Created Sept. 23, 2014 and discarded - Latest diff uploaded

Information
Elvis Angelaccio
ark
65576
Reviewers
kdeutils
rkcosta

This is a review request for an implementation of the renaming feature in Ark. While the implementation is partial, it fulfills most of the use cases expected by the users and provided by other archivers, e.g. Gnome's File Roller.

The goal

Allow the user to rename a file or a directory within an archive. To keep it simple, only one entry at time can be renamed, i.e. the rename action is enabled only when there is a single selection.

What has been implemented

  • Rename using libarchive and the rar plugin.
  • Rename a file
  • Rename a directory
  • Overwrite an existing file after renaming one of its sibling (if the user confirmed the operation)

What is still missing

  • Rename using the zip e 7z plugin. For the zip plugin, there is an upstream bug that makes zipnote crash. For the 7z plugin, its rename command is available only beginning from version 9.28 or later, that is still a beta (even Arch Linux repo are stuck to stable version 9.20). So, for both these formats, either we wait that the renaming feature is made available upstream, or we could try to use libarchive (even if just for renaming).
  • Merging between directories. At the moment is not possible to merge two sibling directories when one of the two is renamed with the name of the other one. It's also not possible to overwrite a directory by a sibling file and viceversa. This feature needs much more work, a own review request and probably a deep refactoring of the ArchiveNode/ArchiveEntry usage.
  • Rename a file and then preview/extract it, to check its content. Repeat the check after reopening the archive.
  • Rename a directory and then preview/extract/rename one of its children. Repeat the check after reopening the archive.
  • Rename a file with the name of a sibling, confirm the overwriting and then preview/extract it. Repeat the check after reopening the archive.
  • Rename a file with the name of a sibling, prevent the overwriting by choosing another name and then preview/extract it. Repeat the check after reopening the archive.
  • Rename a file or directory multiple times in the same Ark session.
Loading...