Bug 469340

Summary: run in terminal command generates impossible path with double drive letters
Product: [Applications] kate Reporter: keistas
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: major    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: creenshot of popup with path generated visible

Description keistas 2023-05-04 07:27:35 UTC
Created attachment 158683 [details]
creenshot of popup with path generated visible

SUMMARY

Impossible to run run python script due to wrong path generated. 

STEPS TO REPRODUCE
1. In terminal configuration window 'python' is entered.
2. python file is opened in the editor.
3.  run in terminal command is used.

OBSERVED RESULT

Path generated starts with double drive letter 'C:/C:/'

EXPECTED RESULT

Path generated starts with single drive letter 'C:/'

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
confirmed on Kate versions  23.04, 23.07.70
Comment 1 Bug Janitor Service 2023-05-08 05:58:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1217
Comment 2 Christoph Cullmann 2023-05-08 19:07:12 UTC
Git commit 209dd6c04bdb48b665cde9900fff729f593aa2b7 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 08/05/2023 at 19:05.
Pushed by cullmann into branch 'master'.

Fix double drive letters on "Run Current Doc"

url.path() returns path which looks like:

/C:/blah/blah

when converted to absolute path using QFileInfo, it results in garbage.
Perhaps we need to fix this in other places as I can see quite a few
places using QUrl::path().

M  +1    -1    addons/konsole/kateconsole.cpp

https://invent.kde.org/utilities/kate/commit/209dd6c04bdb48b665cde9900fff729f593aa2b7
Comment 3 Waqar Ahmed 2023-05-18 07:14:14 UTC
Git commit b0efbc8ef62c48f950996871068b541a6e5be2e5 by Waqar Ahmed.
Committed on 18/05/2023 at 07:13.
Pushed by waqar into branch 'release/23.04'.

Fix double drive letters on "Run Current Doc"

url.path() returns path which looks like:

/C:/blah/blah

when converted to absolute path using QFileInfo, it results in garbage.
Perhaps we need to fix this in other places as I can see quite a few
places using QUrl::path().
(cherry picked from commit 209dd6c04bdb48b665cde9900fff729f593aa2b7)

M  +1    -1    addons/konsole/kateconsole.cpp

https://invent.kde.org/utilities/kate/commit/b0efbc8ef62c48f950996871068b541a6e5be2e5