[Differential] [Request, 14 lines] D3273: Fix entry counter in libarchiveplugin when overwriting entries

rthomsen (Ragnar Thomsen) noreply at phabricator.kde.org
Sat Nov 5 18:43:12 UTC 2016


rthomsen created this revision.
rthomsen added a reviewer: elvisangelaccio.
rthomsen set the repository for this revision to rARK Ark.
rthomsen added a project: Ark.
Restricted Application added a subscriber: kde-utils-devel.

REVISION SUMMARY
  When adding files to an archive with `libarchiveplugin` and the destination files already exist (so they get overwritten), the `entry` signal is still emitted and hence `m_numberOfEntries` gets wrongfully incremented. This diff decrements the counter when an entry already exists.
  
  Overwriting of entries is disabled for `CopyJob` and `MoveJob`, so there is no problem in those cases.

TEST PLAN
  A test case was added to `AddTest` which detects the wrong counter when overwriting an entry.

REPOSITORY
  rARK Ark

REVISION DETAIL
  https://phabricator.kde.org/D3273

AFFECTED FILES
  autotests/kerfuffle/addtest.cpp
  plugins/libarchive/readwritelibarchiveplugin.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: rthomsen, elvisangelaccio
Cc: kde-utils-devel, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20161105/fe72dd08/attachment.html>


More information about the Kde-utils-devel mailing list