Bug 498911 - KIO wrongly sets WorkingDirectory to "."
Summary: KIO wrongly sets WorkingDirectory to "."
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.10.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 504899 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-01-20 03:18 UTC by Kimiblock Moe
Modified: 2025-07-24 13:38 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A Screenshot Of The Improved Modal Text (For Comment 5) (27.28 KB, image/png)
2025-07-24 13:38 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kimiblock Moe 2025-01-20 03:18:13 UTC
SUMMARY
xdg-open consistently fails with this error when trying to open any file or folder in a portable sandbox's home folder

STEPS TO REPRODUCE
1. Install obsidian-bwrap and portable-git from Arch User Repository
2. Create a note
3. Right-click on that note, select "Open in default app" or "Show in system explorer"

OBSERVED RESULT
A window saying "WorkingDirectory= expects an absolute path or '~'", and D-Bus capture shows WorkingDirectory is set to "."

EXPECTED RESULT
WorkingDirectory being set correctly

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
portable on the master branch currently translates the open file request from the app to /proc/<PID>/root/path-to-file. Manually xdg-open the app's home folder "/proc/<PID>/root/home/kimiblock" is fine but anything in the home folder results in an error message.
Comment 1 TraceyC 2025-05-30 15:34:42 UTC
*** Bug 504899 has been marked as a duplicate of this bug. ***
Comment 2 TraceyC 2025-05-30 15:37:59 UTC
I was able to reproduce this while testing the duplicate using these steps

STEPS TO REPRODUCE
1. Open obsidian document
2. Click “export to PDF”
3. Select a path without clicking the sidebar
4. submit

OBSERVED RESULT
Nothing happens, the document is not saved, there is no error
If you click the sidebar, and then try to save the document, it is saved

EXPECTED RESULT
File is saved to PDF
Comment 3 TraceyC 2025-05-30 15:38:23 UTC
.
Comment 4 Roke Julian Lockhart Beedell 2025-07-04 14:02:23 UTC
I have been able to reproduce this with what describes https://discuss.kde.org/t/what-component-do-all-kde-applications-call-that-prevents-them-opening-directories-and-files-whose-absolute-paths-are-path-max-s-value/36442?u=rokejulianlockhart: Specifically, create a file in a path that's past PATH_MAX (usually 4096 characters), then attempt to invoke it in some KDE applications. I forget exactly which one displayed *this* error, but one definitely did.

It looks to me like this error might be generic, when the path is unavailable, per https://bugs.kde.org/show_bug.cgi?id=503584#c7, since Spectacle at least applies the correct PWD otherwise.
Comment 5 Roke Julian Lockhart Beedell 2025-07-24 13:38:46 UTC
Created attachment 183487 [details]
A Screenshot Of The Improved Modal Text (For Comment 5)

(In reply to Roke Julian Lockhart Beedell from comment #4)

Testing with https://fedora.pkgs.org/42/fedora-x86_64/spectacle-6.3.4-1.fc42.x86_64.rpm.html, this appears to have been remediated. I now see:

> The file or folder $path does not exist.