Bug 293511 - Dropping a file on itself: Status bar=Cannot drop FOLDER on itself.
Summary: Dropping a file on itself: Status bar=Cannot drop FOLDER on itself.
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 2.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-02-07 09:21 UTC by Pascal d'Hermilly
Modified: 2012-02-08 16:48 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal d'Hermilly 2012-02-07 09:21:20 UTC
Version:           2.0 (using KDE 4.8.0) 
OS:                Linux

When you drop a file on itself the status bar says "Cannot drop FOLDER on itself".

Reproducible: Always

Steps to Reproduce:
-

Actual Results:  
-

Expected Results:  
-

OS: Linux (x86_64) release 3.0.0-15-generic
Compiler: gcc
Comment 1 Frank Reininghaus 2012-02-07 20:04:52 UTC
Thanks for the bug report!

@Peter: I've noticed that in Dolphin 1.x, a drop on a file (no matter if it's the same file or not) is interpreted as a drop in the folder containing the file. I think that this behavior is considered correct, right?
Comment 2 Frank Reininghaus 2012-02-07 20:07:30 UTC
(To be precise, another user made me aware of what the 1.x behavior was by e-mail).
Comment 3 Frank Reininghaus 2012-02-07 20:40:29 UTC
I forgot to mention that dropping a file on a *different* file actually crashes Dolphin (assert in KonqOperations::asyncDrop() because that function expects either a directory, a desktop file, or an executable as the drop target).
Comment 4 Peter Penz 2012-02-08 09:13:21 UTC
@Frank:
> I forgot to mention that dropping a file on a
> *different* file actually crashes Dolphin

Ah, I introduced this regression - will try to fix it today.

> I've noticed that in Dolphin 1.x, a drop on a file
> (no matter if it's the same file or not) is interpreted
> as a drop in the folder containing the
> file. I think that this behavior is considered correct, right?

Yes: Dropping above a no-directory-file should just drop it into the parent (that's why no hover-notification is done on those files when dragging; still of course there might be better ways to indicate this for the users)
Comment 5 Peter Penz 2012-02-08 16:48:07 UTC
Git commit 13d975a6d7ea6552202a13d0d324754a4247d730 by Peter Penz.
Committed on 08/02/2012 at 15:16.
Pushed by ppenz into branch 'KDE/4.8'.

Drag and drop: Adjust destination if the item is no directory or desktop-file

The URL of the view should be used as destination target if a dropping is not
done above a directory or desktop-file.
FIXED-IN: 4.8.1

M  +1    -1    dolphin/src/kitemviews/kfileitemmodel.cpp
M  +1    -2    dolphin/src/panels/folders/folderspanel.cpp
M  +4    -1    dolphin/src/views/dolphinview.cpp
M  +5    -2    dolphin/src/views/draganddrophelper.cpp
M  +8    -6    dolphin/src/views/draganddrophelper.h

http://commits.kde.org/kde-baseapps/13d975a6d7ea6552202a13d0d324754a4247d730
Comment 6 Peter Penz 2012-02-08 16:48:54 UTC
Git commit 89e2d6920a1e59a7df7c06eaf3c9da8eb32ae260 by Peter Penz.
Committed on 08/02/2012 at 15:16.
Pushed by ppenz into branch 'master'.

Drag and drop: Adjust destination if the item is no directory or desktop-file

The URL of the view should be used as destination target if a dropping is not
done above a directory or desktop-file.
FIXED-IN: 4.8.1

M  +1    -1    dolphin/src/kitemviews/kfileitemmodel.cpp
M  +1    -2    dolphin/src/panels/folders/folderspanel.cpp
M  +4    -1    dolphin/src/views/dolphinview.cpp
M  +5    -2    dolphin/src/views/draganddrophelper.cpp
M  +8    -6    dolphin/src/views/draganddrophelper.h

http://commits.kde.org/kde-baseapps/89e2d6920a1e59a7df7c06eaf3c9da8eb32ae260