summaryrefslogtreecommitdiffstats
path: root/tdeio
diff options
context:
space:
mode:
authorAlexander Golubev <[email protected]>2024-02-15 22:14:11 +0300
committerMichele Calgaro <[email protected]>2024-02-16 18:35:25 +0900
commit26274cb617a71706c0928489d0db959bb3d6589d (patch)
tree50b88dc5066e6a71a5d3c2c401cea2816b82780b /tdeio
parent9d4be4eb1314b453c58b482827f4da5cc132192a (diff)
downloadtdelibs-26274cb617a71706c0928489d0db959bb3d6589d.tar.gz
tdelibs-26274cb617a71706c0928489d0db959bb3d6589d.zip
tdeio/KDirLister: add url validity check
Before 0756aab51 and 4d6667159 this validity check was done for all URLs inside KDirListerCache::listDir(). But since those two commits the result of this check for remote URLs is impossible to propagate to the user. So implicit check is in order. Signed-off-by: Alexander Golubev <[email protected]> (cherry picked from commit 2c18d241d85fd09c72dc219c8816275c3e7cd59a)
Diffstat (limited to 'tdeio')
-rw-r--r--tdeio/tdeio/kdirlister.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tdeio/tdeio/kdirlister.cpp b/tdeio/tdeio/kdirlister.cpp
index 534ec6352..bcebb93ee 100644
--- a/tdeio/tdeio/kdirlister.cpp
+++ b/tdeio/tdeio/kdirlister.cpp
@@ -1946,6 +1946,10 @@ bool KDirLister::openURL( const KURL& _url, bool _keep, bool _reload )
d->changes = NONE;
+ if ( !validURL( _url ) ) {
+ return false;
+ }
+
// Some ioslaves like media:/ or home:/ can provide a local url istead of a remote one
// If a local path is available, monitor that instead of the given remote URL...
if (!_url.isLocalFile()) {