Bug 370948 - Extract ServiceMenu requires write access to archive.
Summary: Extract ServiceMenu requires write access to archive.
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 16.08.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-16 10:53 UTC by Gabriel Cavallo
Modified: 2016-10-18 16:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 16.08.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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