mate-desktop / mate-terminal

The MATE Terminal Emulator
http://www.mate-desktop.org
GNU General Public License v3.0
135 stars 73 forks source link

Avoid unprocessed file URIs being pasted to the terminal. #450

Closed cristian64 closed 7 months ago

cristian64 commented 7 months ago

The uris_as_paths member, which is set to true when the paste command has been triggered by the Paste Filenames action, was being checked too late: a file URI was ultimately being entered to the terminal, as opposed to the expected plain text version.

Test plan:

Without this change, a file URI is entered. For example:

file:///home/jane.doe/my%20pictures/foo%20bar.jpg

With this change, a regular filepath [that the filesystem can recognize] is pasted. For example:

/home/jane.doe/my pictures/foo bar.jpg

Note that the behavior of the Paste Filenames context menu action remains unchanged (i.e. file URIs are still converted to regular paths surrounded by single quotes).

cristian64 commented 7 months ago

Fixes #448.