[Cuis-dev] Issue with Drag-and-Drop of Files from Directories Containing Spaces in Linux
Juan Vuletich
juan at cuis.st
Mon Dec 9 06:41:25 PST 2024
Hi Valentín,
I believe your proposed changes were included in OpenSmalltalk VM,
right? Today, I updated the VM in our main repo to the latest build from
OpenSmalltalk.
Could you please try again with an updated Cuis repo (including the new
VM), and see if the problem is fixed?
Thanks,
On 12/4/2024 7:26 PM, Valentín Vives via Cuis-dev wrote:
>
> I took a look at the VM code (specifically in this file
> <https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/9d41521adff1e9c5d031583ddda38b9a816d9e50/platforms/unix/plugins/DropPlugin/sqUnixDragDrop.c#L73>),
> and it seems that when the path is being extracted, the |file:///|
> prefix is being removed, but the path is not being percent-decoded.
>
> This seems to be exactly the issue described by MariusDoe in this
> issue <https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/666>
> on the OpenSmalltalk GitHub repository. I made a pull request
> <https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/697> to the
> OpenSmalltalk virtual machine, feel free to take a look! :)
>
>
> On Wed, 4 Dec 2024 at 17:42, Valentín Vives <ovives at dc.uba.ar
> <mailto:ovives at dc.uba.ar>> wrote:
>
> Hi everyone,
>
> I hope this email finds you well. I’ve encountered an issue with
> importing files into Cuis on Linux, and I’m hoping to get some
> advice or guidance.
>
> When I try to drag and drop a file from a directory containing
> spaces in its name, Cuis reports that the file does not exist.
> After investigating the code, I found that the primitive
> |primitiveDropRequestFileName| seems to be the source of the problem.
>
> Specifically, on Linux, this primitive returns the file path as a
> URL-encoded string. For example:
> |/home/valnrms/Downloads/2024-2c/Parte%203/04-Portfolio2/Portfolio2-Solucion.st|
> Instead of:
> |/home/valnrms/Downloads/2024-2c/Parte
> 3/04-Portfolio2/Portfolio2-Solucion.st|.
>
> On Windows, the primitive correctly returns the path with spaces,
> but I don’t have access to macOS to verify its behavior there.
>
> I also tried investigating whether the File List could provide a
> workaround since it seems to handle file paths with spaces
> correctly. However, I haven’t been able to make much progress yet
> in leveraging that approach.
>
> I’d like to address this issue, but I believe it requires
> modifying the primitive. Unfortunately, I’m not sure where to
> begin with this. If anyone could provide some guidance, advice, or
> documentation to help me start working on this, I would greatly
> appreciate it.
>
> Thanks in advance for your help!
>
> Best regards,
>
> Valentín :)
>
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241209/c7902d65/attachment.htm>
More information about the Cuis-dev
mailing list