From 2c18d241d85fd09c72dc219c8816275c3e7cd59a Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Thu, 15 Feb 2024 22:14:11 +0300 Subject: [PATCH] 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 --- tdeio/tdeio/kdirlister.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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()) {