Discussion:
[plasmashell] [Bug 391606] New: Undoing file removal causes an "Internal error in copyOrMove, should never happen" error
(too old to reply)
b***@kde.org
2018-03-09 12:12:48 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

Bug ID: 391606
Summary: Undoing file removal causes an "Internal error in
copyOrMove, should never happen" error
Product: plasmashell
Version: 5.12.2
Platform: Manjaro
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: Desktop Containment
Assignee: ***@kde.org
Reporter: ***@gmail.com
CC: plasma-***@kde.org
Target Milestone: 1.0

Created attachment 111276
--> https://bugs.kde.org/attachment.cgi?id=111276&action=edit
GIF recording of the bug.

KDE Plasma Version: 5.12.2
KDE Frameworks Version: 5.43.0
Qt Version: 5.10.1
Kernel Version: 4.15.7-1-MANJARO

Steps to reproduce:
1. Delete any file/folder
2. Attempt to undo

This does not happen anywhere else.
--
You are receiving this mail because:
You are watching all bug changes.
b***@kde.org
2018-03-09 12:13:07 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

***@gmail.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2018-03-09 12:44:57 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

Kai Uwe Broulik <***@privat.broulik.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
CC| |***@privat.broulik.de
Status|UNCONFIRMED |CONFIRMED

--- Comment #1 from Kai Uwe Broulik <***@privat.broulik.de> ---
I bet that's an issue with desktop:/ KIO slave URL rewriting. I can only
reproduce in FolderView when pointed at desktop:/ but not at e.g. $HOME

In Dolphin you don't get the option to Trash (but only Delete Permanently) for
desktop:/ likely because of that. (However, I think you should be able to trash
and restore files on the desktop, so I'd rather like to see that fixed than
disable trashing)
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2018-03-09 12:45:01 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

Kai Uwe Broulik <***@privat.broulik.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|***@kde.org |***@kde.org
Component|Desktop Containment |Folder
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2018-03-09 12:57:44 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

Kai Uwe Broulik <***@privat.broulik.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@kde.org

--- Comment #2 from Kai Uwe Broulik <***@privat.broulik.de> ---
Bug seems to be in FileUndoManager.

FolderModel does:
KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Trash, urls,
QUrl(QStringLiteral("trash:/")), job);

When I trash from destkop:/ and try to restore, FileUndoManager tries to do

m_currentJob = KIO::rename(op.m_dst, op.m_src, KIO::HideProgressInfo);

with m_dst being trash:/foo and src being desktop:/foo but KIO::rename
explicitly states that it would fail when "direct renaming" isn't possible
which here it clearly isn't as trash and desktop are two different protocols.
CC'ing David Faure
--
You are receiving this mail because:
You are watching all bug changes.
Dr. Chapatin
2018-03-12 13:24:55 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

Dr. Chapatin <***@gmx.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmx.com
--
You are receiving this mail because:
You are watching all bug changes.
David Faure
2018-03-13 14:42:24 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

--- Comment #3 from David Faure <***@kde.org> ---
Try replacing rename() with file_move(), which is higher level and supports
remote protocols?

That would be a more generic solution than trying to resolve to local paths in
special cases.
--
You are receiving this mail because:
You are watching all bug changes.
b***@kde.org
2018-04-06 13:27:41 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

***@emeel.net changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@emeel.net

--- Comment #4 from ***@emeel.net ---
I am also affected by this.
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2018-04-06 13:46:29 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606
Try replacing rename() with file_move(), which is higher level and supports remote protocols?
Further down there's a codepath m_current.isMoveCommand() || m_current.m_type
== FileUndoManager::Trash using file_move which seems to be for this particular
usecase. I'l see if shuffling the if statements around helps.
--
You are receiving this mail because:
You are watching all bug changes.
b***@kde.org
2018-04-06 13:51:24 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606
Post by Kai Uwe Broulik
I'l see if shuffling the if statements around helps.
Sound like a great debugging strategy. xD
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2018-04-06 15:03:13 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

--- Comment #7 from Kai Uwe Broulik <***@privat.broulik.de> ---
Patch: https://phabricator.kde.org/D11987

(If I start growing gray hair you know why ;)
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2018-04-12 11:50:48 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391606

Kai Uwe Broulik <***@privat.broulik.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@galaxy.za.net

--- Comment #8 from Kai Uwe Broulik <***@privat.broulik.de> ---
*** Bug 393021 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are watching all bug changes.
Loading...