Diffusion KIO 1e1e24a73f4c

[StatJob] Make mostLocalUrl ignore remote (ftp, http...etc) URLs

Authored by ahmadsamir on May 13 2020, 6:26 PM.

Description

[StatJob] Make mostLocalUrl ignore remote (ftp, http...etc) URLs

Summary:
Previously mostLocalUrl would check that !url.isLocalFile(), that meant
a statjob would be fired for remote urls (ftp, http... etc), such urls
will never have a mostLocalUrl. Instead check for protocols with Class=:local.

Also if the statjob is created via KIO::mostLocalUrl, the job was, correctly,
cancelled if the url isLocalFile(), extend it to also cancel the job if the
protocol Class isn't ":local".

For a list of such protocols: grep :local /usr/share/kservices5/*.protocol

Thanks to sitter for figuring it out in the bug report.

BUG: 420985
FIXED-IN: 5.71

Test Plan: the jobtest unit test still passes

Reviewers: Frameworks, dfaure, sitter

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D29782

Details

Committed
ahmadsamirMay 23 2020, 2:46 PM
Differential Revision
D29782: [StatJob] Make mostLocalUrl ignore remote (ftp, http...etc) URLs
Parents
R241:1cca05e96d73: Add porting docu for KRun constructor.
Branches
Unknown
Tags
Unknown