Skip to content

Commit

Permalink
Warn when new file names can no longer be generated.
Browse files Browse the repository at this point in the history
  • Loading branch information
daltomi authored and eribertomota committed Jun 11, 2019
1 parent a3a2d12 commit 5fa034e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,19 @@ void scrot_check_if_overwrite_file(char **filename)

free(*filename);
*filename = newname;

if (count == max_count) {
fprintf(stderr, "scrot can no longer generate new file names.\n"
"The last attempt is %s\n", newname);
free(newname);
exit(EXIT_FAILURE);
}
}


void
scrot_grab_mouse_pointer(const Imlib_Image image,
const int ix_off, const int iy_off)
const int ix_off, const int iy_off)
{
XFixesCursorImage *xcim = XFixesGetCursorImage(disp);

Expand Down

0 comments on commit 5fa034e

Please sign in to comment.