Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot save captures when savePath basename starts with a dot (.) #3611

Open
madduck opened this issue May 17, 2024 · 0 comments
Open

Cannot save captures when savePath basename starts with a dot (.) #3611

madduck opened this issue May 17, 2024 · 0 comments
Labels
Unconfirmed Bug The bug is not confirmed by anyone else.

Comments

@madduck
Copy link

madduck commented May 17, 2024

Flameshot Version

12.1.0

Installation Type

Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)

Operating System type and version

Debian unstable

Description

I used to have savePath set to ~/.tmp for the last couple of years. For a few weeks or months now, this no longer works:

% flameshot screen -n 0 -p ~/.tmp
flameshot: error: Error trying to save as /home/madduck/.tmp/2024-05-17-10-32-04-Screenshot.tmp

% ls -l /home/madduck/.tmp/2024-05-17-10-32-04-Screenshot.tmp
-rw-rw---- 1 madduck madduck 0 May 17 10:32 /home/madduck/.tmp/2024-05-17-10-32-04-Screenshot.tmp

but it works fine if I use any other directory that doesn't start with a dot, even if the directory itself is within a directory starting with a dot.

Steps to reproduce

% for i in .with-dot without-dot .with-dot/subdir without-dot/.dotted-subdir; do echo; mkdir -v $i; flameshot screen -n 0 -p ${PWD}/$i; done

mkdir: created directory '.with-dot'
flameshot: error: Error trying to save as …/.with-dot/2024-05-17-10-34-40-Screenshot.with-dot

mkdir: created directory 'without-dot'
flameshot: info: Capture saved as …/without-dot/2024-05-17-10-34-40-Screenshot.png

mkdir: created directory '.with-dot/subdir'
flameshot: info: Capture saved as …/subdir/2024-05-17-10-34-40-Screenshot.png

mkdir: created directory 'without-dot/.dotted-subdir'
flameshot: error: Error trying to save as …/without-dot/.dotted-subdir/2024-05-17-10-34-40-Screenshot.dotted-subdir

In the cases that flameshot fails, it creates a .tmp file in the directory just fine, but then failes to write to it, i.e. it stays at size==0.

Let me know if you need an strace, though I think you'll be able to reproduce this yourself.

Screenshots or screen recordings

No response

System Information

Debian unstable, triple screen setup using AwesomeWM on Xorg, but the same problem also exists on the laptop with just the laptop screen (same config otherwise).

@madduck madduck added the Unconfirmed Bug The bug is not confirmed by anyone else. label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed Bug The bug is not confirmed by anyone else.
Projects
None yet
Development

No branches or pull requests

1 participant