[Differential] [Request, 60 lines] D551: Start extraction only if Ark has write permissions
elvisangelaccio (Elvis Angelaccio)
noreply at phabricator.kde.org
Wed Nov 18 17:11:37 UTC 2015
elvisangelaccio created this revision.
elvisangelaccio added a reviewer: rthomsen.
Herald added a subscriber: kde-utils-devel.
REVISION SUMMARY
We never check if a destination directory is writable, while doing an ExtractJob.
We can do this check only once, in `ExtractJob::doWork()`, instead of doing it
in each plugin's copyFiles(). This way we don't even start a cli process which
we already know is going to fail.
The only downside is that in batch mode (ark -b) the error message is displayed
twice, once in a KMessageBox and once in a Plasma notification.
BUG: 192219
FIXED-IN: 15.12.0
TEST PLAN
Trying to extract any kind of archive in a non-writable directory triggers the
error messagebox.
REPOSITORY
rARK Ark
BRANCH
bug/192219
REVISION DETAIL
https://phabricator.kde.org/D551
AFFECTED FILES
CMakeLists.txt
kerfuffle/archive_kerfuffle.cpp
kerfuffle/archive_kerfuffle.h
kerfuffle/archiveinterface.h
kerfuffle/cliinterface.cpp
kerfuffle/cliinterface.h
kerfuffle/jobs.cpp
kerfuffle/jobs.h
kerfuffle/tests/jsonarchiveinterface.cpp
kerfuffle/tests/jsonarchiveinterface.h
part/archivemodel.cpp
part/archivemodel.h
part/part.cpp
part/part.h
plugins/libarchive/libarchivehandler.cpp
plugins/libarchive/libarchivehandler.h
plugins/libsinglefileplugin/singlefileplugin.cpp
plugins/libsinglefileplugin/singlefileplugin.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: elvisangelaccio, rthomsen
Cc: kde-utils-devel
More information about the Kde-utils-devel
mailing list