Bug 515240

Summary: Save/Open Portal Dialog always opening parent dir of request folder
Product: [Plasma] xdg-desktop-portal-kde Reporter: Parker Reed <parker.l.reed>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: akselmo, aleixpol, nate, ngompa, sitter
Priority: NOR    
Version First Reported In: 6.5.90   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of dialog from dbus example
New user screenshot

Description Parker Reed 2026-01-29 04:31:58 UTC
Created attachment 189013 [details]
Screenshot of dialog from dbus example

SUMMARY

When a dialog is requested via the portal (for example Firefox save/open) the displayed folder is always the parent directory of the requested folder. This leads to issues like asking for /home/$user and being placed in /home/ instead, requiring the user to navigate to a valid folder.

STEPS TO REPRODUCE
1. Either trying saving a file in Firefox or use the gdbus call below
2. Observe that the displayed folder is the parent of either browser.download.lastDir in Firefox or whatever was requested in the dbus call

OBSERVED RESULT

Parent directory is opened

EXPECTED RESULT

Requested folder to be opened

SOFTWARE/OS VERSIONS
Linux: Fedora Rawhide 
KDE Plasma Version: 6.5.90
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1

ADDITIONAL INFORMATION

Reproducible gdbus call. This opens my /home/parker folder instead of Downloads. Tested on 6.5.5 and Downloads is opened as expected.

gdbus call --session \
  --dest org.freedesktop.portal.Desktop \
  --object-path /org/freedesktop/portal/desktop \
  --method org.freedesktop.portal.FileChooser.OpenFile \
  "" "Portal OpenFile repro" \
  "{'handle_token':<'repro'>,'current_folder':<@ay [$(
      (printf '%s\0' "$HOME/Downloads" | od -An -tu1) | tr -s ' ' ',' | tr -d '\n' | sed 's/^,*//;s/,*$//'
  )]>}"
Comment 1 Akseli Lahtinen 2026-01-29 11:11:07 UTC
Using the provided example, this opens the correct folder (Downloads) for me, so can't reproduce the bug.

Operating System: KDE Linux 2026-01-28
KDE Plasma Version: 6.6.80
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.1
Kernel Version: 6.18.6-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600
Comment 2 Harald Sitter 2026-01-29 13:57:18 UTC
Yeah. Can't reproduce either. Which is a bit suspicious because the code isn't different between 6.6 beta and master.
Comment 3 Nate Graham 2026-01-29 14:23:54 UTC
Your D-Bus call works for me too on KDE Linux; I get a window showing ~/Downloads.
Comment 4 Nate Graham 2026-01-29 14:24:20 UTC
Can you reproduce this in a new clean user account on the same computer with no customization?
Comment 5 Parker Reed 2026-01-29 14:39:52 UTC
I just noticed if there's a trailing / on the folder it opens the correct path

"$HOME/Downloads" opens /home/parker

"$HOME/Downloads/" opens /home/parker/Downloads

Will try with a new user account and report back.
Comment 6 Parker Reed 2026-01-29 14:47:18 UTC
Created attachment 189035 [details]
New user screenshot

Same issue on new user. Screenshot show calling both versions with and without the trailing /
Comment 7 Nate Graham 2026-01-29 14:53:30 UTC
Thanks, Parker.

Neal, can you think of anything Fedora-specific that might be causing this?
Comment 8 Parker Reed 2026-01-29 14:59:07 UTC
Could the issue be before the portal even? Looking at dbus monitor, I see the *incorrect* path in the method call

method call time=1769698664.919924 sender=:1.57 -> destination=:1.67 serial=3015 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.impl.portal.FileChooser; member=OpenFile
   object path "/org/freedesktop/portal/desktop/request/1_150/repro"
   string "org.kde.konsole"
   string ""
   string "Portal OpenFile repro"
   array [
      dict entry(
         string "current_folder"
         variant             array of bytes "/home/parker" + \0
      )
   ]
method call time=1769698672.842676 sender=:1.57 -> destination=:1.67 serial=3034 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.impl.portal.FileChooser; member=OpenFile
   object path "/org/freedesktop/portal/desktop/request/1_151/repro"
   string "org.kde.konsole"
   string ""
   string "Portal OpenFile repro"
   array [
      dict entry(
         string "current_folder"
         variant             array of bytes "/home/parker/Downloads" + \0
      )
   ]


First was asking for /home/parker/Downloads and second was /home/parker/Downloads/
Comment 9 Parker Reed 2026-01-29 15:08:07 UTC
Same story for Firefox. Something in the dbus chain is eating the path

      dict entry(
         string "current_folder"
         variant             array of bytes "/home" + \0
      )
Comment 10 Parker Reed 2026-01-29 15:40:17 UTC
I believe this is outside of KDE at this point but leaving this info here for posterity

When I updated to rawhide here's the dbus related packages that got pulled in

  Upgrade   abrt-dbus-0:2.17.8-3.fc44.x86_64                                        Dependency      updates
  Upgrade   dbus-1:1.16.0-8.fc44.x86_64                                             Group           updates
  Upgrade   dbus-common-1:1.16.0-8.fc44.noarch                                      Dependency      updates
  Upgrade   dbus-daemon-1:1.16.0-8.fc44.x86_64                                      Dependency      updates
  Upgrade   dbus-devel-1:1.16.0-8.fc44.x86_64                                       Dependency      updates
  Upgrade   dbus-glib-0:0.112-13.fc44.x86_64                                        External User   updates
  Upgrade   dbus-glib-devel-0:0.112-13.fc44.x86_64                                  Dependency      updates
  Upgrade   dbus-libs-1:1.16.0-8.fc44.x86_64                                        Dependency      updates
  Upgrade   dbus-libs-1:1.16.0-8.fc44.i686                                          Dependency      updates
  Upgrade   dbus-tools-1:1.16.0-8.fc44.x86_64                                       Dependency      updates
  Upgrade   dbus-x11-1:1.16.0-8.fc44.x86_64                                         Dependency      updates
  Upgrade   dbusmenu-qt-0:0.9.3-0.40.20160218.fc44.x86_64                           Dependency      updates
  Upgrade   dbusmenu-qt5-0:0.9.3-0.40.20160218.fc44.x86_64                          Dependency      updates
  Upgrade   kf5-kdbusaddons-0:5.116.0-5.fc44.x86_64                                 Dependency      updates
  Upgrade   kf6-kdbusaddons-0:6.22.0-2.fc44.x86_64                                  Dependency      updates
  Upgrade   libblockdev-lvm-dbus-0:3.4.0-2.fc44.x86_64                              Dependency      updates
  Upgrade   libdbusmenu-0:16.04.0-31.fc44.x86_64                                    Dependency      updates
  Upgrade   libdbusmenu-devel-0:16.04.0-31.fc44.x86_64                              Dependency      updates
  Upgrade   libdbusmenu-gtk2-0:16.04.0-31.fc44.x86_64                               Dependency      updates
  Upgrade   libdbusmenu-gtk3-0:16.04.0-31.fc44.x86_64                               Dependency      updates
  Upgrade   lvm2-dbusd-0:2.03.38-2.fc44.noarch                                      Dependency      updates
  Upgrade   python3-dbus-0:1.4.0-9.fc44.x86_64                                      Dependency      updates
  Upgrade   python3-dbus-next-0:0.2.3-18.fc44.noarch                                Dependency      updates
  Upgrade   sdbus-cpp-0:2.2.1-2.fc44.x86_64                                         Dependency      updates
  Upgrade   xdg-dbus-proxy-0:0.1.6-4.fc44.x86_64                                    Dependency      updates
Comment 11 Harald Sitter 2026-01-29 21:07:25 UTC
If the request enters the portal with the last component and leaves it without then the portal is probably to blame, yeah.