https://bugs.kde.org/show_bug.cgi?id=420985

Ahmad Samir <a.samir...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/kio/commit/38998e066
                   |                            |aa711ec5da0d20817ff2f77d91b
                   |                            |964b
         Resolution|---                         |FIXED
   Version Fixed In|                            |5.71
             Status|REPORTED                    |RESOLVED

--- Comment #1 from Ahmad Samir <a.samir...@gmail.com> ---
Git commit 38998e066aa711ec5da0d20817ff2f77d91b964b by Ahmad Samir.
Committed on 23/05/2020 at 15:46.
Pushed by dfaure into branch 'master'.

[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.

FIXED-IN: 5.71

Test Plan:
- The jobtest unit test still passes, and a new unit test that tests
  that mostLocalUrl for a local file was added
- The testtrash unit test was extended to test mostLocalUrl (returns url
  as-is as the Trash protocol doesn't set UDS_LOCAL_PATH)

Reviewers: #frameworks, dfaure, sitter

Subscribers: kde-frameworks-devel

Tags: #frameworks

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

Construct QUrl correctly with trash:/ protocol

Don't check the protocol class, checking if UDS_LOCAL_PATH is set is
enough.

M  +9    -0    autotests/jobtest.cpp
M  +1    -0    autotests/jobtest.h
M  +11   -8    src/core/statjob.cpp
M  +7    -5    src/core/statjob.h
M  +16   -0    src/ioslaves/trash/tests/testtrash.cpp
M  +1    -0    src/ioslaves/trash/tests/testtrash.h

https://invent.kde.org/frameworks/kio/commit/38998e066aa711ec5da0d20817ff2f77d91b964b

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to