Skip to content

Can't move / copy files in dolphin to redirected drives in KDE #3614

@vscfreire

Description

@vscfreire

xrdp version

0.10.3

Detailed xrdp version, build options

Operating system & version

Rocky Linux 9.6

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

xorgxrdp

What desktop environment do you use?

KDE

Environment xrdp running on

VM

What's your client?

mstsc.exe (Windows 11)

Area(s) with issue?

File transfer / drive redirection

Steps to reproduce

1 - Create an example .txt file (test.txt) on your home directory
2 - Open dolphin and copy the file
3 - Navigate to a redirected folder (such as ~/thinclient_drives/C:/Users//Desktop/)
4 - Attempt to paste the file

✔️ Expected Behavior

The file should be copied to the desktop

❌ Actual Behavior

The file isn't copied to the desktop and an error appears "There is not enough space on the disk to write"

Anything else?

Hi,

When copying files from a KDE (Plasma 5.27.12) xrdp session using Dolphin to the Windows desktop over xrdp drive redirection, Dolphin always reports:

There is not enough space on the disk to write

Using either "cp" or using the "Save as" file dialogs works as expected.

I'm aware of a similar issue #3300, which was closed by PR #3304. From what I've gathered this fix is included in the version I am using. Running df -h as mentioned in that PR shows that the fix is working as intended:

df -h ~/thinclient_drives/  ~/thinclient_drives/C\:/
Filesystem      Size  Used Avail Use% Mounted on
xrdp-chansrv    0.0K  0.0K  0.0K    - /home/<user>/thinclient_drives
xrdp-chansrv    953G  782G  171G  83% /home/<user>/thinclient_drives

In a comment in PR #3304 it suggests that the fix was tested in dolphin and that it was working as expected, which made me want to take a close look at KIO's source code. Inspecting the code I found out the function responsible for getting the directory's available space when a copy is performed (https://invent.kde.org/frameworks/kio/-/blob/v5.116.0/src/ioslaves/file/file.cpp#:~:text=void%20FileProtocol%3A%3AfileSystemFreeSpace(const%20QUrl%20%26url):

The problem here is in the use of QT's QStorageInfo, since it performs a statfs on the root path (~/thinclient_drives) of the directory instead of the actual directory (https://github.com/qt/qtbase/blob/v5.15.9-lts-lgpl/src/corelib/io/qstorageinfo_unix.cpp#L831):

Therefore it always returns 0 available space for my directories. Replacing QStorageInfo with statfs on KIO's function solves the problem.

I am undecided whether this is an xrdp issue or a KIO issue, since KIO's approach works for traditional file systems as the mountpoint should always have space.

I would like to know if you encounter similar problems and if you have a suggestion on how to approach this issue.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions