Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow overwriting existing files #661

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

Closed
7chervet opened this issue Jun 3, 2021 · 3 comments
Closed

Allow overwriting existing files #661

7chervet opened this issue Jun 3, 2021 · 3 comments
Assignees

Comments

@7chervet
Copy link

7chervet commented Jun 3, 2021

Describe the bug
the file patern of save file doesn't contain any parameter. I just enter a fixed name in order to always save the screenshot with the same name.
When I take a second screenshot, the filename is incremented with a suffix "(2)" and so one !!!

To Reproduce
Steps to reproduce the behavior:

  1. start ksnip
  2. set up the auto save file and folder without any parameter as for instance c:/.../temp/image.jpg
  3. take a screenshot. The file image.jpg is created
  4. take a new screenshot. A new file is created image(2).jpg instead of rewriting file image.jpg

Expected behavior
As there is no specific pattern in the filename, the expected behavior is to rewrite the file for each screenshot taken

Reason : I have a word, powerpoint and outlook macro which inserts the image file in the document or email quite easily...

Desktop (please complete the following information):

  • OS: W10 build 2009 (19042.985)
  • Distribution in case of Linux [e.g. Ubuntu]
  • Window System in case of Linux [e.g. X11]
  • ksnip version 1.9.0
  • How did you install ksnip [e.g. AppImage] : from zipfile "ksnip-1.9.0-windows.zip" downloaded from internet (of course)

Additional context
Add any other context about the problem here.

@7chervet 7chervet added the bug label Jun 3, 2021
@DamirPorobic
Copy link
Member

Well, it's not a bug but rather behaving as expected. If you download a file twice with your browser that has the same name, it would also attempt to rename it with a suffix. I do see your use case here, we might need a config option for this, if files with the same name should be overwritten.

@7chervet
Copy link
Author

7chervet commented Jun 4, 2021 via email

@DamirPorobic
Copy link
Member

Implemented, kudos to @fnkhz!

@DamirPorobic DamirPorobic self-assigned this Jan 8, 2022
@DamirPorobic DamirPorobic changed the title Screenshot is numbered although no "#" in file pattern Allow overwriting existing files Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants