OpenSmalltalk / opensmalltalk-vm

Cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak.
http://opensmalltalk.org/
Other
563 stars 111 forks source link

DropPlugin should percent-decode the file URI on Unix #666

Open MariusDoe opened 1 year ago

MariusDoe commented 1 year ago

On Unix, when dropping a file that has spaces or other special characters in its path, primitiveDropRequestFileName returns a percent-encoded version of the path and primitiveDropRequestFileHandle fails.

I think the problem is that dropRequestFileName skips the file:/// prefix of the URI, but does not percent-decode it. Interestingly, uri2string, which isn't currently used, does percent-decoding.

dropRequestFileName is used by primitiveDropRequestFileName and also by dropRequestFileHandle, which is why primitiveDropRequestFileHandle fails.

Note: I did not check whether this problem exists on other platforms.