[utilities/kate/release/26.08] apps/lib: use Utils::absoluteUrl to have same normalization as via the KateDocManager

Christoph Cullmann <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 40fc1dd55964bd26c1dfaa46fef371d739153831 by Christoph Cullmann.
Committed on 16/07/2026 at 17:17.
Pushed by cullmann into branch 'release/26.08'.

use Utils::absoluteUrl to have same normalization as via the KateDocManager

will kill ../../ chains and fix issues with bad filetree nesting

BUG: 519737


(cherry picked from commit 6f367063aa0bbfd3f4c9a9651512862e82fd10cf)

Co-authored-by: Christoph Cullmann <[email protected]>

M  +3    -1    apps/lib/katefileactions.cpp

https://invent.kde.org/utilities/kate/-/commit/40fc1dd55964bd26c1dfaa46fef371d739153831

diff --git a/apps/lib/katefileactions.cpp b/apps/lib/katefileactions.cpp
index c34949d48f..ebafe591be 100644
--- a/apps/lib/katefileactions.cpp
+++ b/apps/lib/katefileactions.cpp
@@ -107,7 +107,9 @@ void KateFileActions::renameDocumentFile(QWidget *parent, KTextEditor::Document
     QWidget::connect(job, &KJob::result, parent, [parent, doc, oldFileUrl](KJob *finishedJob) {
         auto *copyJob = static_cast<KIO::CopyJob *>(finishedJob);
         if (!copyJob->error()) {
-            doc->openUrl(copyJob->destUrl());
+            // use Utils::absoluteUrl to have same normalization as via the KateDocManager
+            // will kill ../../ chains and fix issues with bad filetree nesting, bug 519737
+            doc->openUrl(Utils::absoluteUrl(copyJob->destUrl()));
             Q_EMIT doc->documentSavedOrUploaded(doc, true);
         } else {
             KMessageBox::error(parent,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.