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

Flameshot should check if the path is valid #1139

Closed
mmahmoudian opened this issue Nov 4, 2020 · 3 comments
Closed

Flameshot should check if the path is valid #1139

mmahmoudian opened this issue Nov 4, 2020 · 3 comments
Labels
Enhancement Feature requests and code enhancements Good first issue Issues labeled as such are a good way to get use to the codebase. Ask for help if needed.
Milestone

Comments

@mmahmoudian
Copy link
Member

mmahmoudian commented Nov 4, 2020

Flameshot version
Flameshot v0.8.3 (from flameshot-git AUR)
Compiled with Qt 5.15.0

Describe the bug
Flameshot fails to save the captured screenshot the first time it is running, and produce the following error:
image

From the second time on-wards, it asks for the path to save the image, I assume because the path it tries to save to does not exist.

Note that I do not have folder Screenshots in my ~/Pictures folder, and I have never configured Flameshot to save images in such path:
image
image

To Reproduce
flameshot --gui is mapped to my PrntScrn

  1. When flameshot is not running (no tray icon, no process), I press the PrntScrn
  2. select an area (with or without annotation)
  3. click the floppy icon to save on disk
  4. the error in the notification

Expected behavior
If the path does not exists, it warns the user and open a file browser window and ask the user where to save the captured image

System Information
Operating System: Manjaro Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.8.16-2-MANJARO
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4770K CPU @ 3.50GHz
Memory: 15.5 GiB of RAM
Graphics Processor: GeForce GTX 1060 6GB/PCIe/SSE2

@mmahmoudian mmahmoudian added the Bug It's a bug label Nov 4, 2020
@mmahmoudian
Copy link
Member Author

mmahmoudian commented Nov 4, 2020

I had to play with this to figure out what was the issue: I realized that I was initiating the Flameshot with PrntScrn and then out of habit clicking on the tray icon to take screenshots. From there, it was clear that the keyboard shortcut setting was adding the Pictures/Screenshots as an argument. I went and checked and I was right:

image

My keyboard shortcuts were set using:
https://github.com/flameshot-org/flameshot/blob/master/docs/shortcuts-config/flameshot-shortcuts-kde

I still would suggest that the Flameshot checks if the provided path exists and if not, it shows proper warning and then open a file browser window and ask the user to choose the path for the image to be saved to.

@mmahmoudian mmahmoudian reopened this Nov 4, 2020
@mmahmoudian mmahmoudian changed the title First screenshot cannot be saved Flameshot should check if the path is valid Nov 4, 2020
@borgmanJeremy borgmanJeremy added Good first issue Issues labeled as such are a good way to get use to the codebase. Ask for help if needed. Enhancement Feature requests and code enhancements and removed Bug It's a bug labels Nov 7, 2020
@borgmanJeremy borgmanJeremy added this to the v0.9.0 milestone Nov 26, 2020
@who8mypnuts
Copy link

Thank you. I was running into this issue with the most recent version of Flameshot and modifying the KDE settings fixed it!

@mmahmoudian
Copy link
Member Author

I believe this is resolved by #1859

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature requests and code enhancements Good first issue Issues labeled as such are a good way to get use to the codebase. Ask for help if needed.
Projects
None yet
Development

No branches or pull requests

3 participants