[CompressFileItemAction] Don't offer for non-local URLs
ClosedPublic

Authored by broulik on Aug 14 2018, 3:55 PM.

Details

Summary

We pass %F to ark command which means "multiple local paths".
KFileItemListProperties::isLocal() doesn't see that desktop:/foo is a link to a local file, so doing it manually here.

Test Plan
  • Compressing single and multiple local files still works
  • Compressing files on desktop:/ still works
  • Entry no longer shows up for desktop:/ itself as it cannot compress that anyway

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Aug 14 2018, 3:55 PM
Restricted Application added a project: Ark. · View Herald TranscriptAug 14 2018, 3:55 PM
Restricted Application added subscribers: Ark, kde-utils-devel. · View Herald Transcript
broulik requested review of this revision.Aug 14 2018, 3:55 PM
elvisangelaccio requested changes to this revision.Aug 14 2018, 9:11 PM

Looks good otherwise.

app/compressfileitemaction.cpp
53

constBegin() / constEnd()

This revision now requires changes to proceed.Aug 14 2018, 9:11 PM
elvisangelaccio accepted this revision.Aug 14 2018, 9:16 PM

Actually, the list is already const, so this is fine as is.

This revision is now accepted and ready to land.Aug 14 2018, 9:16 PM
This revision was automatically updated to reflect the committed changes.