https://bugs.kde.org/show_bug.cgi?id=525554

Mirko Laruina <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Mirko Laruina <[email protected]> ---
I was able to reproduce the bug but it seems to me it is not related to how
Spectacle is configured.
If I try to Export > Share while in the rectangular selection editor (like in
your video), I get "Could not share file /path/to/temp/file does not exist"
If I try to Export > Share from the Spectacle window, it works correctly.

Just to be sure we are talking about the same issue, could you try with
different settings and check how it behaves? 

I had a look at the source code and the issue might be in how the Share menu is
handled: when the mouse hovers on it, a temporary image is stored and its path
is sent to the selected application (e.g. KDE Connect). After this is done, the
selection editor closes with the current selection being accepted, which
indirectly triggers the deletion of the temporary image to perform a save based
on user settings.
The issue is that the share application is still using the old path, so if it
works asynchronously (like KDE Connect) it may not find the image.

Strace seems to confirm:
> ❯ strace -e trace=creat,unlink,unlinkat,open,openat spectacle 2>&1 | grep -E 
> "/tmp|/home/mirko/Pictures"
> openat(AT_FDCWD, "/tmp", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 40
> openat(AT_FDCWD, "/tmp/Spectacle.wLCSoy/lockfile", 
> O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 40
> openat(AT_FDCWD, "/tmp/Spectacle.wLCSoy/Screenshot_20260916_231729.png", 
> O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 43
> openat(AT_FDCWD, 
> "file:///tmp/Spectacle.wLCSoy/Screenshot_20260916_231729.png", 
> O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file > or directory)
> openat(AT_FDCWD, 
> "file:///tmp/Spectacle.wLCSoy/Screenshot_20260916_231729.png", 
> O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> unlink("/tmp/Spectacle.wLCSoy/Screenshot_20260916_231729.png") = 0
> openat(AT_FDCWD, 
> "/home/mirko/Pictures/Screenshots/Screenshot_20260916_231729.png", 
> O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> openat(AT_FDCWD, 
> "/home/mirko/Pictures/Screenshots/Screenshot_20260916_231729.png", 
> O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 47
> openat(AT_FDCWD, 
> "/home/mirko/Pictures/Screenshots/Screenshot_20260916_231729.png", 
> O_RDONLY|O_CLOEXEC) = 50

KDE Connect was using /tmp/Spectacle.wLCSoy/Screenshot_20260916_231729.png,
which was already deleted when I chose the device I wanted to share to.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to