| Summary: | Opening file on Windows starts in %SYSTEM_ROOT% (system32) instead of user home | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | jm.ouwerkerk |
| Component: | application | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | christoph, jpmbatrina01, paul.m.w.johnson, vonreth |
| Priority: | NOR | ||
| Version First Reported In: | 20.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Other | ||
| Latest Commit: | https://invent.kde.org/utilities/kate/-/commit/88af55db389cc35dd274220426c74a1714c8aa1e | Version Fixed/Implemented In: | 23.12.0 |
| Sentry Crash Report: | |||
|
Description
jm.ouwerkerk
2021-06-24 18:50:42 UTC
Confirmed with Kate 21.04.0 intalled via the MS Store on June 25, 2021. The origin of this bug is similar to that of https://bugs.kde.org/show_bug.cgi?id=425136 . However, it seems that when kate is installed through the MS Store, the kate binary is launched directly which means the working directory cannot be set to the home directory. FWIW, the same thing happens with e.g. Okular, but Kile does not have this bug since it uses the home folder as an explicit default/fallback location (https://github.com/KDE/kile/blob/3e727f38dcb2ddc111bdc76b07b45c57919f96af/src/widgets/filebrowserwidget.cpp#L60). I searched for a way to set the working dir for the appx stuff, failed so far. That would be in my eyes the only "usable" solution. We can't know inside the application if the current working dir is a good fallback or not, in most cases, e.g. if you started from terminal it is, here it isn't. I'm not sure if it works (and it might be a bit too complicated/overkill), but maybe the workingDirectory config option from the Package Support Framework fixup (https://docs.microsoft.com/en-us/windows/msix/psf/package-support-framework#create-a-configuration-file) might be what we're looking for? The linked documentation says "package-relative path" though, so I'm not sure if the home folder can be used. Hmm, that could be some solution, perhaps it is possible to use some variable inside this to get to the user profile. CCin Hannah, perhaps she has some idea. I confirm this using Kate 21.04.0 when installed from MS Store. In the process of updating, I decided to uninstall the Store version and get the latest portable build and merge it into my portable programs structure. Using 21.08.0 for Windows, portable build, the default paths for opening and saving files are now the location of the Kate binary file. A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1290 Git commit 88af55db389cc35dd274220426c74a1714c8aa1e by Christoph Cullmann. Committed on 28/08/2023 at 20:55. Pushed by cullmann into branch 'master'. start open dialog in home if not started from terminal M +4 -0 apps/lib/kateviewmanager.cpp https://invent.kde.org/utilities/kate/-/commit/88af55db389cc35dd274220426c74a1714c8aa1e |