Bug 342247

Summary: Can't drag-and-drop a URL/link containing characters or filename length that aren't valid on destination filesystem
Product: [Frameworks and Libraries] frameworks-kio Reporter: Gregor Mi <codestruct>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: arjunak234, kdelibs-bugs, nate, nb64367
Priority: NOR    
Version: 5.45.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Gregor Mi 2014-12-27 11:17:32 UTC
Reproduce:

1. Open Browser (tested with Firefox and Chromium)
2. Visit page with long URL, e.g. https://www.google.de/maps/dir/North+Pole,+AK,+United+States/Mexico+City,+Mexico/@49.9739648,-132.3287779,4z/data=!4m14!4m13!1m5!1m1!1s0x51324d51d5c5f2b9:0xda1a7714d9d98964!2m2!1d-147.3494444!2d64.7511111!1m5!1m1!1s0x85ce0026db097507:0x54061076265ee841!2m2!1d-99.133208!2d19.4326077!3e0
3. Drag and drop the URL by dragging the address bar icon to the desktop or another folder and choose "Link here"
4. The following error message appears:
```
Error -- Dolphin

Could not write to /home/user1/tmp/https:⁄⁄www.google.de⁄maps⁄dir⁄North+Pole,+AK,+United+States⁄Mexico+City,+Mexico⁄@49.9739648,-132.3287779,4z⁄data=!4m14!4m13!1m5!1m1!1s0x51324d51d5c5f2b9:0xda1a7714d9d98964!2m2!1d-147.3494444!2d64.7511111!1m5!1m1!1s0x85ce0026db097507:0x54061076265ee841!2m2!1d-99.133208!2d19.4326077!3e0.desktop.
```

Expected:
The desktop file should be created; illegal characters should be replaced and/or the filename should be truncated if it is too long.

(Out-of-scope and probably more a Firefox issue: it would be nice if the page title of the visited web site would be included in the filename)
Comment 1 bunu 2014-12-27 19:20:22 UTC
[I am a GCI student]

I can confirm for Ubuntu 14.10. But I do not experience any file name issues.
Comment 2 Myriam Schweingruber 2014-12-29 13:50:27 UTC
Changing status to confirmed.
Comment 3 Nate Graham 2018-04-24 22:09:25 UTC
Still an issue in KDE Frameworks 5.45.
Comment 4 Chinmoy Ranjan Pradhan 2019-05-14 12:25:16 UTC
Git commit 092beaf6fbab83fc7ab87684bcde0e2e32b4bc8f by Chinmoy Ranjan Pradhan.
Committed on 14/05/2019 at 12:25.
Pushed by chinmoyr into branch 'master'.

Truncate long filname before creating a link

Summary:
URL of a website can exceed 255 characters. Consequently we cannot create a link to such URL.
In such cases try to truncate the filename to 255 characters.

Reviewers: dfaure, ngraham

Reviewed By: dfaure, ngraham

Subscribers: kde-frameworks-devel

Tags: #frameworks

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

M  +14   -1    src/core/copyjob.cpp

https://commits.kde.org/kio/092beaf6fbab83fc7ab87684bcde0e2e32b4bc8f