Conversation
vjr
left a comment
There was a problem hiding this comment.
The code LGTM but I can't confirm (repro) the fix works...
|
When dragging a file with '#' in its name into the Terminal, the pasted path gets cut off after '#' |
A bug has now been identified so dismissing approval in case of accidental merging.
Nautilus seems to have the same problem (with Pantheon Terminal). |
|
Cut and paste works correctly. |
|
This appears to be a bug in Terminal not Files - the "sanitization" of dropped uris is causing this truncation. |
|
See #877 for Terminal fix. |
|
Hmmm just tested in a VM. It does fix D&Ding the |
|
@zeebok Thanks for the review - it is hard to fix this problem without introducing problems elsewhere hence the need for multiple testers. There is a Terminal PR to fix handling |
|
@zeebok I cannot reproduce the problem with pasting into Code I am afraid (using current master version of Code on OS8). I notice that pasting from other file managers into Terminal also truncates confirming that it is a Terminal bug. |
|
I can conform that pasting into Music is problematic. I suspect it is because Files is including the |
|
Hmm, I now cannot reproduce the Music issue after recompiling Music from source, neither on version 8.0.0 or version 7.0.0 of Music, at least with files not containing There is a problem similar to Terminal in Music where the URI of files is truncated at the first occurrence of |
|
@zeebok I'd be grateful for your review after the latest commits. I noticed that Files was only providing the TargetType TEXT_URI_LIST to other apps - I've fixed that although I don't think it is related to this issue necessarily. I've also tried to clarify the code a little with better names and comments. I suggest you test using Music compiled from source as the current release has issues with dropped files. I also suggest testing with Terminal compiled from elementary/terminal#877. I could not get dropping onto Amberol to work - maybe because it is a Gtk4 app and DnD is done differently? I think any issues with 3rd party apps will have to be left for another PR. |
Co-authored-by: Leo <lenemter@gmail.com>
Co-authored-by: Leo <lenemter@gmail.com>
Co-authored-by: Leo <lenemter@gmail.com>
|
@lenemter I've incorporated your suggested changes and it works correctly with Terminal. I am still getting issue elementary/music#816 with Music though whereas Dolphin and Nautilus work correctly. This is using a file with May be because the |
|
@lenemter Its started working with Music now! Not sure what's going on. Must have been running a different version to the one I thought 🤷 |
|
@lenemter I've made the requested change - sorry I missed that. It seems to work OK but I would be grateful for more testing. |
|
Hmm, dropping onto the pathbar seems broken. Update: This seems to be an issue in |
|
Also dropping some files (containing hash in name) onto Dolphin is broken but works on Nautilus 🤷 Update: Dropping the same file from Nautilus doesn't work either so maybe a Dolphin issue. |
Fixes #2615
After #2268 files being copied or dragged have their name sanitized before being given to the recipient so that they appear correctly when pasted/dropped as text. However, they were not being re-escaped when used in a file operation and this caused the operation to fail for some files. This PR fixes that.
After this PR, copy/dragging a file should work both to a text document or terminal and to another folder in Files (or Dolphin or Nautilus at least).
Note that Dolphin does not unescape filenames when transferred as text but Nautilus does.