lossless-cut icon indicating copy to clipboard operation
lossless-cut copied to clipboard

Drag-and-drop fails in snap package

Open ExTechOp opened this issue 2 months ago • 2 comments

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Operating System

Linux

Steps to reproduce

  • Install losslesscut 3.64.0 (stable version) with snap to Fedora 42 (Adams)
  • Start losslesscut
  • The very first prompt that comes up in the main window is DROP FILE(S)
  • Attempt to drag-and-drop any file from Caja 1.28.0-7 file manager

Expected behavior

File should open just as you'd opened it with File → Open…

Actual behavior

Popup Failed to open file, ENOENT: No such file or directory with a full correct-looking path to the file. Could this perhaps be due to the snap sandbox or selinux? Going the normal File → Open… route works fine.

Note: embedded whitespace in the filename does not seem to make a difference, doesn't work with a filename without any whitespace either.

Share log from developer tools

/home/username/directory/filename with spaces.ts
util.ts:359 Failed to open file Error: ENOENT: no such file or directory, lstat '/home/username/directory/filename with spaces.ts'
withErrorHandling @ util.ts:359
await in withErrorHandling (async)
(anonymous) @ App.tsx:1675
onDrop @ App.tsx:2286
util.ts:319 handleError Failed to open file Error: ENOENT: no such file or directory, lstat '/home/username/directory/filename with spaces.ts'
handleError @ util.ts:319
withErrorHandling @ util.ts:360
await in withErrorHandling (async)
(anonymous) @ App.tsx:1675
onDrop @ App.tsx:2286
Now

ExTechOp avatar Oct 26 '25 11:10 ExTechOp

Does it work with AppImage version? losslesscut already specifies all the snap plugs as well as removable-media so I don't see how it can be a permission issue:

https://github.com/mifi/lossless-cut/blob/251027a931e4298bfde594768ae52505de244c32/package.json#L464-L466

maybe related #410

mifi avatar Oct 27 '25 07:10 mifi

I have the same problem with a mounted USB drive. Drag and drop works on my /home and /mnt/store (a usb) but not /mnt/usb. Looking at the differences between they are referenced, the /mnt/usb was using a symbolic link rather than a direct filesystem path. I changed the bookmark to use the path and it worked. According to man pages lstat has problems with symlinks.

Mount details for reference: /dev/mapper/fedora-home on /home type ext4 (rw,relatime,seclabel) /dev/mapper/stor1-lv--stor1 on /mnt/store type ext4 (rw,relatime,seclabel) /dev/sdc1 on /mnt/usb type btrfs (rw,relatime,seclabel,compress=zstd:1,space_cache,subvolid=5,subvol=/)

greyghoster avatar Nov 14 '25 05:11 greyghoster