Bug 382046 - [mtp] Cannot paste from clipboard to empty folders
Summary: [mtp] Cannot paste from clipboard to empty folders
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: MTP (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 381238 (view as bug list)
Depends on:
Blocks: 419560
  Show dependency treegraph
 
Reported: 2017-07-06 09:48 UTC by Elvis Angelaccio
Modified: 2022-01-09 12:25 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elvis Angelaccio 2017-07-06 09:48:09 UTC
If the phone has an empty folder, it's not possible to 'Paste Clipboard Contents' there (from Dolphin). The 'Create New' menu is enabled, though.

Originally reported in https://bugs.kde.org/show_bug.cgi?id=366795#c32
Comment 1 Albert Vaca 2017-07-25 22:24:46 UTC
This is also the case of FUSE filesystems like sshfs, which is used by KDE Connect.

Bug reported on the KDE Connect side: https://bugs.kde.org/show_bug.cgi?id=381238
Comment 2 Albert Vaca 2017-07-25 22:26:26 UTC
*** Bug 381238 has been marked as a duplicate of this bug. ***
Comment 3 Albert Vaca 2017-07-25 22:29:21 UTC
Find here the fix that was done in KIO for bug 366795, which was the same problem but on any directory: https://cgit.kde.org/kio.git/commit/?id=fcbfb61a5304554483ceb49d8728d0e947a4af9e

Apparently this fix doesn't work for empty directories.
Comment 4 Albert Vaca 2017-07-25 23:10:54 UTC
Here is the fix: https://phabricator.kde.org/D6906
Comment 5 Albert Vaca 2017-07-26 08:35:12 UTC
Git commit 0ac78aa3fba42dbd72f656c200e0748223c41397 by Albert Vaca.
Committed on 26/07/2017 at 08:34.
Pushed by albertvaka into branch 'master'.

Emit a "." UDSEntry when not present, even on empty directories.

Differential Revision: https://phabricator.kde.org/D6906

M  +10   -10   src/core/slavebase.cpp

https://commits.kde.org/kio/0ac78aa3fba42dbd72f656c200e0748223c41397
Comment 6 Albert Vaca 2017-07-29 14:00:43 UTC
Reverted fix, because it was triggering a Q_ASSERT in KCoreDirLister when used by kio_desktop.
Comment 7 Aleix Pol 2018-01-16 20:24:14 UTC
*** Bug 375709 has been marked as a duplicate of this bug. ***
Comment 8 Philippe ROUBACH 2018-01-17 13:32:49 UTC
don't know if it can help.

with Bluetooth there is no problem.

with android i use the app "astro bluetooth module". i assume this add obex protocol
Comment 9 andreas.krutzler 2018-10-08 17:39:48 UTC
Git commit aaa1edbb74c4fb01affbde7b79bb45d3a9b61f83 by Andreas Krutzler.
Committed on 08/10/2018 at 17:39.
Pushed by akrutzler into branch 'master'.

[mtp] Move MTP device handling from kioslave to kiod-module

Summary:
Consult T9390 for more information.
Related: bug 319880, bug 325924, bug 336456, bug 372860, bug 383314, bug 396527

Closes T9390

Reviewers: elvisangelaccio, ltoscano, hetzenecker, dfaure, mlaurent

Reviewed By: elvisangelaccio, dfaure, mlaurent

Subscribers: mlaurent, kde-frameworks-devel, kfm-devel

Tags: #dolphin, #frameworks

Maniphest Tasks: T9390

Differential Revision: https://phabricator.kde.org/D15277

M  +5    -5    mtp/CMakeLists.txt
D  +0    -229  mtp/devicecache.cpp
D  +0    -86   mtp/devicecache.h
D  +0    -73   mtp/filecache.cpp
D  +0    -81   mtp/filecache.h
M  +483  -576  mtp/kio_mtp.cpp
M  +14   -8    mtp/kio_mtp.h
D  +0    -358  mtp/kio_mtp_helpers.cpp
D  +0    -46   mtp/kio_mtp_helpers.h
A  +19   -0    mtp/kiod_module/CMakeLists.txt
A  +171  -0    mtp/kiod_module/kmtpd.cpp     [License: GPL (v2+)]
A  +63   -0    mtp/kiod_module/kmtpd.h     [License: GPL (v2+)]
A  +12   -0    mtp/kiod_module/kmtpd.json
A  +127  -0    mtp/kiod_module/mtpdevice.cpp     [License: GPL (v2+)]
A  +78   -0    mtp/kiod_module/mtpdevice.h     [License: GPL (v2+)]
A  +635  -0    mtp/kiod_module/mtpstorage.cpp     [License: GPL (v2+)]
A  +142  -0    mtp/kiod_module/mtpstorage.h     [License: GPL (v2+)]
A  +21   -0    mtp/shared/CMakeLists.txt
A  +70   -0    mtp/shared/kmtpdeviceinterface.cpp     [License: LGPL]
A  +64   -0    mtp/shared/kmtpdeviceinterface.h     [License: LGPL]
A  +85   -0    mtp/shared/kmtpdinterface.cpp     [License: LGPL]
A  +70   -0    mtp/shared/kmtpdinterface.h     [License: LGPL]
A  +147  -0    mtp/shared/kmtpfile.cpp     [License: LGPL]
A  +90   -0    mtp/shared/kmtpfile.h     [License: LGPL]
A  +98   -0    mtp/shared/kmtpstorageinterface.cpp     [License: LGPL]
A  +77   -0    mtp/shared/kmtpstorageinterface.h     [License: LGPL]
A  +50   -0    mtp/shared/org.kde.kmtp.daemon.xml
A  +62   -0    mtp/shared/org.kde.kmtp.device.xml
A  +154  -0    mtp/shared/org.kde.kmtp.storage.xml

https://commits.kde.org/kio-extras/aaa1edbb74c4fb01affbde7b79bb45d3a9b61f83
Comment 10 Germano Massullo 2020-04-02 18:11:47 UTC
Hi Andreas Krutzler, you may want to check also
https://bugs.kde.org/show_bug.cgi?id=419560
Comment 11 Philippe ROUBACH 2021-02-25 05:54:15 UTC
problem not fixed. I must create a folder in the destination folder to get the right to past a file.

openSuse 15.2
kde apps 20.12.2
kde frameworks 5.21.1
kde plasma 5.79.0
qt 5.15.2

kde kdeconnect 20.12.2
android kdeconnect 1.16.0

Samsung S2 Plus android 7.1.2 (Lineagesos 14.1)
Samsung S7 andoid 8.0
Comment 12 Philippe ROUBACH 2021-04-26 11:24:22 UTC
Problem not fixed. 

I must create a folder in the destination folder to get the right to past a file.

openSuse 15.2
kde gear 21.04.0
kde plasma 5.21.4
kde frameworks 5.81.0
qt 5.15.2

kde kdeconnect 21.04.0
android kdeconnect 1.16.0

Samsung S2 Plus android 7.1.2 (Lineagesos 14.1)
Samsung S7 andoid 8.0
Comment 13 Harald Sitter 2022-01-07 13:03:35 UTC
Still a problem with 21.12?

Also, is it failing with MTP or kdeconnect?
Comment 14 Philippe ROUBACH 2022-01-07 13:25:17 UTC
(In reply to Harald Sitter from comment #13)
> Also, is it failing with MTP or kdeconnect?

The report is about mtp.

I speak about kdeconnect because this is the same problem. So perhaps this can help.
Comment 15 Philippe ROUBACH 2022-01-08 12:42:27 UTC
openSUSE 15.3
KDE gear 21.12.1
plasma 5.23.5
frameworks 5.89
qt 5.15.2

No more problem copying a file in an empty folder with MTP protocol.
Comment 16 Nate Graham 2022-01-08 16:50:30 UTC
Working for me too! Let's call it fixed.
Comment 17 Philippe ROUBACH 2022-01-09 12:25:02 UTC
my kdeconnect bug report https://bugs.kde.org/show_bug.cgi?id=375709 
was marked as duplicate of this problem.

The problem is not solved for kdeconnect  kde 21.12.1, kdeconnect android 1.18.1