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

Save error when using the same strftime variable twice #74

Closed
jinks opened this issue Jan 20, 2021 · 2 comments · Fixed by #96
Closed

Save error when using the same strftime variable twice #74

jinks opened this issue Jan 20, 2021 · 2 comments · Fixed by #96
Labels
question Further information is requested

Comments

@jinks
Copy link

jinks commented Jan 20, 2021

I was experimenting with the save_file_fmt config and it appears re-using the same placeholder twice makes the save fail.

config parameter:
save_filename_format=%Y-%m-swappy-%Y%m%d-%H%M%S.png

Result:
** (swappy:1600448): CRITICAL **: 04:36:19.122: unable to save drawing area to pixbuf: Failed to open “/home/jinks/Pictures/Screenshots/2021-01-swappy-20210120-043619.p��e �\u007f” for writing: Invalid or incomplete multibyte or wide character

@jtheoof
Copy link
Owner

jtheoof commented Feb 13, 2021

@jinks I can't reproduce this issue even with the same save_filename_format as you. How are you running swappy?

@jtheoof jtheoof added invalid This doesn't seem right question Further information is requested and removed invalid This doesn't seem right labels Feb 13, 2021
jtheoof added a commit that referenced this issue Feb 21, 2021
Most of the filesystems have max filename limited to 255 chars.

Let's set that limit and handle the case where the resulting `strftime`
format is larger.

Closes #74
jtheoof added a commit that referenced this issue Feb 21, 2021
Most of the filesystems have max filename limited to 255 chars.

Let's set that limit and handle the case where the resulting `strftime`
format is larger.

Closes #74
jtheoof added a commit that referenced this issue Feb 21, 2021
Most of the filesystems have max filename limited to 255 chars.

Let's set that limit and handle the case where the resulting `strftime`
format is larger.

Closes #74
@jtheoof
Copy link
Owner

jtheoof commented Feb 21, 2021

@jinks I could reproduce and fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants