1. 25 Sep, 2020 1 commit
  2. 12 Apr, 2020 1 commit
  3. 19 Jun, 2019 1 commit
  4. 02 Jun, 2019 2 commits
  5. 16 Feb, 2019 1 commit
  6. 31 Oct, 2018 1 commit
    • Alexander Volkov's avatar
      libzipplugin: Simplify registration of progress callbacks · 43ae86b0
      Alexander Volkov authored
      Summary:
      Use zip_register_progress_callback_with_state() that was
      introduced in libzip 1.3 (we already require this version).
      
      Pass 0.001 as precision because this value is used for
      old zip_register_progress_callback() inside libzip.
      Also pass nullptr as a free function, because 'this' doesn't
      need to be freed.
      
      Reviewers: #ark, elvisangelaccio
      
      Reviewed By: #ark, elvisangelaccio
      
      Subscribers: elvisangelaccio, kde-utils-devel, #ark
      
      Tags: #ark
      
      Differential Revision: https://phabricator.kde.org/D16276
      43ae86b0
  7. 14 Oct, 2018 1 commit
  8. 25 Feb, 2018 1 commit
    • Elvis Angelaccio's avatar
      Rework kill logic · b1a251eb
      Elvis Angelaccio authored
      The libzip plugin sometimes cannot react to `QThread::requestInterruption()`
      because there is a blocking `zip_close()` which writes to disk (e.g. with AddJobs).
      
      This means we have to manually abort the thread (by passing a timeout to
      `QThread::wait()` in `Job::doKill()`. We cannot do this uconditionally
      because we would end up with crashes in libarchive. Since the libarchive
      plugin is not affected by this problem, we rework the logic in
      `Job::doKill()` by assuming that the interface will tell us whether it
      needs to be brutally killed. This way we can distinguish between the
      libarchive and the libzip plugins (the ones that use a worker thread).
      
      The mutex in this patch is needed because in theory `m_operationMode` could be
      read and written by different threads at the same time, even though that's unlikely.
      
      BUG: 389290
      FIXED-IN: 18.03.80
      Task: T7824
      b1a251eb
  9. 21 Oct, 2017 1 commit
  10. 19 Mar, 2017 2 commits
  11. 16 Mar, 2017 1 commit
    • Ragnar Thomsen's avatar
      Add libzip plugin · ee74c157
      Ragnar Thomsen authored
      A new plugin for libzip was added. The plugin is only built if libzip
      1.20 or higher is installed, but is the preferred plugin for zip
      archives.
      
      FEATURE:
      Differential Revision: D5039
      ee74c157
  12. 02 Dec, 2016 1 commit
  13. 27 Nov, 2016 1 commit
    • Elvis Angelaccio's avatar
      Don't show two progress bars with batch extractions · 660076c4
      Elvis Angelaccio authored
      BatchExtractJob runs a LoadJob first and an ExtractJob after, which results in two
      different progress bars in the notification tray. This patch changes how the
      percentage is computed: the first 50% is from the LoadJob, the 2nd 50% from the
      ExtractJob. This ensures that only one progress bar shows up while the wrapper job
      is running. This will only work if the interface is able to report progress for
      both LoadJobs and ExtractJobs (currently only libarchive and clirar).
      
      Differential Revision: D3518
      660076c4
  14. 02 Nov, 2016 1 commit
    • Elvis Angelaccio's avatar
      Fix crash when aborting LoadJobs · 04d8a981
      Elvis Angelaccio authored
      LoadJob::onNewEntry() receives an Entry pointer. When we kill a LoadJob, the
      libarchive plugin deletes all the emitted entries, so onNewEntry() (which is
      queued in the events) gets a pointer that points to already free'ed memory.
      
      This patch just delays the deletion of entries by using deleteLater().
      This ensures that all the pending slots are executed first.
      
      Differential Revision: D3143
      04d8a981
  15. 17 Oct, 2016 1 commit
    • Ragnar Thomsen's avatar
      Show progress in percentage for all job types in LibarchivePlugin · ef1753b4
      Ragnar Thomsen authored
      Progress is now also shown in percentage for Addjob, CopyJob, DeleteJob
      and MoveJob for archives handled by LibarchivePlugin. This was a bit
      tricky due to libarchive always iterating the whole archive and means
      that the plugin needs to know the total number of existing archive
      entries.
      
      A new member variable m_numberOfEntries was added to
      ReadOnlyArchiveInterface, which holds the total number of entries in the
      archive. The variable is kept up-to-date by incrementing/decrementing it
      whenever the entry and entryRemoved signals are emitted by a plugin.
      This necessitated a slight rework of the handling of MoveJob and CopyJob
      by LibarchivePlugin because these emitted entry when iterating over the
      old entries. The new approach should also be more efficient.
      
      The two Archive members m_numberOfFiles and m_numberOfFolders were
      removed.
      
      ReadOnlyArchiveInterface::addFiles() got an additional argument of type
      uint that holds the number of entries to be added.
      
      Differential Revision: D3072
      ef1753b4
  16. 12 Oct, 2016 1 commit
    • Elvis Angelaccio's avatar
      Fix crash when moving files with clizip · 377dfcfe
      Elvis Angelaccio authored
      Entry objects are created by the plugins, so it is wrong to delete them from other
      places. If the plugins run in the main thread, we can just set a parent
      to the entries. Otherwise (in the libarchive case) we need to manually
      delete them.
      
      Closes T3988
      
      Differential Revision: D3027
      377dfcfe
  17. 11 Oct, 2016 1 commit
  18. 09 Oct, 2016 1 commit
    • Ragnar Thomsen's avatar
      Detect compression method · 50a9f590
      Ragnar Thomsen authored
      A new property was added to Archive to store detected compression
      method(s). Currently, it's only displayed in PropertiesDialog, but the
      plan is to also use it to select a sane default compression method when
      adding files to an existing archive. Code was added to all plugins for
      detecting the compression method(s) when opening an archive and a signal
      added to ReadOnlyArchiveInterface to set the property.
      
      Many archive types support multiple compression methods in same archive,
      so the property is a QStringList.
      
      Differential Revision: D2987
      50a9f590
  19. 14 Sep, 2016 1 commit
    • Elvis Angelaccio's avatar
      Fix race condition when killing jobs · 8ad610bf
      Elvis Angelaccio authored
      The `m_abortOperation` global variable was set by the main thread and read
      by the secondary thread, i.e. undefined behavior.
      
      QThread::requestInterruption() and isInterruptionRequest() are instead
      safe because they use a QMutexLocker.
      
      Tested only with ListJobs, are other type of jobs are currently broken
      (see e.g. bugs #365869 and #365870).
      
      Closes T3598
      8ad610bf
  20. 15 Aug, 2016 1 commit
  21. 17 Jul, 2016 1 commit
  22. 03 May, 2016 1 commit
    • Ragnar Thomsen's avatar
      Add basic test functionality · 13d70a48
      Ragnar Thomsen authored
      Add a TestJob and associated action in Part. Test functionality is
      enabled in plugin json files, currently for clizip, clirar and cli7z.
      Test results are displayed simply as success/failure in a KMessageBox.
      
      Testing password-protected archives will currently result in an
      errorbox, due to these archives potentially having different passwords
      for each file and hence multiple password prompts might pop up.
      
      Libarchive does not support testing archives.
      
      FEATURE: 140492
      FIXED-IN: 16.08.0
      Differential Revision: D1516
      13d70a48
  23. 30 Apr, 2016 1 commit
    • Ragnar Thomsen's avatar
      Add support for editing/adding archive comments · 04d56afa
      Ragnar Thomsen authored
      Support was added for editing comments in supported archive types
      (currently only RAR). A new bool was added to plugin json files
      ("SupportsWriteComment") to indicate support. A new action was added and
      is found in Archive menu. The editing of comment is done in the same
      QPlainTextEdit used to display comments before. When user modifies
      comment, a KMessageWidget pops up with a "Save" button. Actual saving of
      comment to archive is achieved by a new job type: CommentJob.
      
      FEATURE: 357594
      FIXED-IN: 16.08.0
      GUI:
      Differential Revision: D1493
      04d56afa
  24. 23 Apr, 2016 1 commit
    • Elvis Angelaccio's avatar
      libarchive: properly stop all jobs · 8c21ca3a
      Elvis Angelaccio authored
      We use the m_abortOperation flag in the same way ListJob does (see commit
      acb455da).
      
      We also need to remove the disconnect() in the Job destructor, which makes Ark
      crash if we stop an AddToArchive job. This disconnect() looks like a relic of the
      past (see e.g. commit 15fce6f5) and doesn't seem really necessary.
      
      Note that the CliInterface jobs still need to be fixed. So do batch extract
      jobs, which are KCompositeJobs and currently ignore the kill button in the
      systray.
      
      CCBUG: 222392
      
      Differential Revision: D1466
      8c21ca3a
  25. 08 Mar, 2016 1 commit
    • Elvis Angelaccio's avatar
      Port plugins loading to KPluginLoader · 060d23f0
      Elvis Angelaccio authored
      The ark plugins are now ported to the new KPluingLoader loading mechanism.
      The main advantage is that we now save a call to the Syscoca service trader,
      since the plugins are installed in a private 'kerfuffle' subdirectory of the
      system plugins folder.
      
      In order to be found by KPluginLoader, a plugin has to embed its metadata
      defined in a .json file. We convert the existing .desktop files to .json at build time, when possible.
      Otherwise we use directly .json metadata files (e.g. for clirar or cliunarchiver).
      
      The libarchive plugin had to be split in two different plugins, one for the
      read-only mimetypes and another one for the read-write ones. This is because
      the old plugin was using two .desktop files, but the new plugins can only embed
      a single .json file.
      
      For more details, see task T923 on phabricator.
      060d23f0
  26. 18 Nov, 2015 2 commits
    • Ragnar Thomsen's avatar
      Improve error handling by libarchive plugin · b385b865
      Ragnar Thomsen authored
      Handle errors when extracting, adding and deleting by emitting the error
      signal which makes Part display an error message. Previously, errors
      were only output to console.
      
      A new query (ContinueExtractionQuery) was added. This query is used when
      an error occurs when extracting an entry to ask the user if the
      extraction should be aborted. A checkbox is available to ignore further
      errors.
      
      An extra argument was added to copyData() so the filename of the
      entry that failed can be output to console.
      
      This commit is partly based on work done by Raphael in RR123832.
      
      Differential Revision: D471
      b385b865
    • Elvis Angelaccio's avatar
      246bd99e
  27. 14 May, 2014 1 commit
    • Albert Astals Cid's avatar
      Properly stop list jobs on close · acb455da
      Albert Astals Cid authored
      Track running jobs in JobTracker. On its destruction (i.e. UI is going down) we kill and delete (which waits for finishing) those jobs.
      
      Tested with very big tar.gz (libarchive plugin) and .zip (cliplugin) and it closes without crashing now
      
      Acked by rakuco
      BUGS: 193908
      FIXED-IN: 4.13.2
      REVIEW: 118108
      acb455da
  28. 27 Jul, 2010 5 commits
  29. 29 Dec, 2009 1 commit
  30. 05 Jul, 2009 1 commit
    • Raphael Kubo da Costa's avatar
      Move from KLibLoader::self to KPlugFactory. · 02d76bf8
      Raphael Kubo da Costa authored
      Kerfuffle::factory has been mostly rewritten and looks cleaner. The
      constructor for ReadOnlyArchiveInterface had to be changed because of
      K_EXPORT_PLUGIN as well, so all plugins had to change their constructor
      signature too.
      
      svn path=/trunk/KDE/kdeutils/ark/; revision=991479
      02d76bf8
  31. 12 Jun, 2009 1 commit
  32. 10 Jun, 2009 1 commit
  33. 08 Jun, 2009 1 commit