[Differential] [Request, 3 lines] D2939: Show progress in percentage when listing archives with libarchiveplugin

rthomsen (Ragnar Thomsen) noreply at phabricator.kde.org
Tue Oct 4 20:12:49 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
  After having fiddled around with callback functions for several hours, I stumbled upon this very nice function:
  
  `archive_filter_bytes(struct archive *, int)`
  
  The function returns the number of bytes read from the archive and thus can be used for computing progress of listing an archive. The second argument is `-1` for the outmost filter (see `archive.h` in libarchive source). The progress can now be calculated with this simple two-line patch.

TEST PLAN
  1. List large archives with libarchiveplugin (try various formats).
  2. Check that the progress is shown in percentage in statusbar.

REPOSITORY
  rARK Ark

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

AFFECTED FILES
  plugins/libarchive/libarchiveplugin.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/20161004/40ff05e8/attachment.html>


More information about the Kde-utils-devel mailing list