Bug 370948

Summary: Extract ServiceMenu requires write access to archive.
Product: [Applications] ark Reporter: Gabriel Cavallo <gabrielcavallo>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED FIXED    
Severity: normal CC: rthomsen6, simonandric5
Priority: NOR    
Version: 16.08.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 16.08.3
Sentry Crash Report:

Description Gabriel Cavallo 2016-10-16 10:53:11 UTC
The Ark "Extract" ServiceMenu is grayed as unusable on archives that don't have write permissions.
Extraction should require write access to parent folder but only read access to the archive itself.

Reproducible: Always

Steps to Reproduce:
Make archive read-only `chmod 440 example.zip`.

Actual Results:  
Right click archive in Dolphin and the "Extract" menu is unusable.

Expected Results:  
Read permission on archive should allow extraction.
Comment 1 Elvis Angelaccio 2016-10-16 17:39:23 UTC
Confirmed, thanks for reporting.
Comment 2 Elvis Angelaccio 2016-10-17 21:50:45 UTC
Git commit 6f0e4ead6f33f4a6ae2530c551952e8443bd3c8b by Elvis Angelaccio.
Committed on 17/10/2016 at 21:34.
Pushed by elvisangelaccio into branch 'Applications/16.08'.

Allow extraction of read-only archives

Currently we use `KFileItemListProperties::supportsWriting()` to check whether a folder
is read-write and can be used as extract destination, but this function returns
false if the archive is read-only. A read-only archive can still be extracted,
so we need to implement our own check for the writability of parent folders.
FIXED-IN: 16.08.3

Differential Revision: D3074

M  +11   -3    app/extractfileitemaction.cpp

http://commits.kde.org/ark/6f0e4ead6f33f4a6ae2530c551952e8443bd3c8b