[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] DnD/Unix: Fix `dropRequestFileName` which removed the trailing slash from the path (PR #616)

Christoph Thiede notifications at github.com
Fri Feb 25 23:51:11 UTC 2022


For more than one year, drag'n'drop from the host system into the VM was broken on Linux/X11 due to a regression introduced via facfd9012e9f95679dc054fde69c13d5d4b514ca. `primitiveDropRequestFileName` would always answer `home/Christoph/myfile.txt` rather than `/home/Christoph/myfile.txt`, causing the file to be ignored on the image-side in Squeak. Now I finally found the cause of the bug, it was a simple off-by-one error.

Tested on Linux/Ubuntu with XDG/Nautilus under WSL/VcXsrv. The bug was also reported to occur on native Linux distributions, though.

Notes:

- [ ] I don't know any system or application that would pass paths in one of the other formats (`file:/path` or `/path`). If anyone knows such applications, this would make a nice reprocase. Could you please test this out in your environment?
- Related issue: There was also a bug report for DnD on macOS always being one file behind, i.e., nothing appearing in the image on the first drop, the first file appearing on the drop, etc. However, I think this is unrelated to this bug (different platform) and I have also no option to reproduce this unless Apple provides usable visualization support. If anyone is addressing the issue, skimming the history around facfd9012e9f95679dc054fde69c13d5d4b514ca might be a good starting point, anyway.

Mentioning @eliotmiranda as the author of facfd9012e9f95679dc054fde69c13d5d4b514ca and @marceltaeumel FYIO. :-)
You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/616

-- Commit Summary --

  * DnD/Unix: Fix dropRequestFileName which removed the trailing slash from the path

-- File Changes --

    M platforms/unix/plugins/DropPlugin/sqUnixDragDrop.c (20)

-- Patch Links --

https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/616.patch
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/616.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/616
You are receiving this because you are subscribed to this thread.

Message ID: <OpenSmalltalk/opensmalltalk-vm/pull/616 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20220225/de0ee80e/attachment.html>


More information about the Vm-dev mailing list