Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote filename on paste #2268

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Quote filename on paste #2268

wants to merge 7 commits into from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Jul 23, 2023

Fixes #664

First commit (fix quotes)

  • Always quote urls in clipboard
  • Remove quotes before creating a Glib.File from the path

Second commit (fix protocol for DND)

  • Clarify when file:// will be included by using explicit parameters for sanitize_path. In most uses the protocol file:// is not included, but it is used by the pathbar.

With this PR, dragging a file item into a text target and copy/pasting it into a text target both cause a quoted url to be inserted.

There is still a difference between DND and Copy/Paste in that the former always includes the protocol whereas the latter the removes the protocol if it is "file://". This is because the item might be dropped on a target where the protocol is needed.

@jeremypw jeremypw requested a review from a team July 23, 2023 15:45
@jeremypw jeremypw marked this pull request as draft July 23, 2023 16:06
@jeremypw jeremypw changed the title Make transfer of files to text target consistent - quoted and without "file://" protocol Make transfer of files to text target both insert a quoted URL Jul 23, 2023
@jeremypw jeremypw changed the title Make transfer of files to text target both insert a quoted URL Make transfer of files to text target always insert a quoted URL Jul 24, 2023
# Conflicts fixed:
#	src/Application.vala
@jeremypw jeremypw changed the title Make transfer of files to text target always insert a quoted URL Dnd files to text target insert a quoted URL with protocol Oct 13, 2023
@jeremypw jeremypw changed the title Dnd files to text target insert a quoted URL with protocol Quote filename on paste Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy/Pasting a file into the terminal does not quote the filename
2 participants