The ask before save option in gpicview-0.1.9 is ignored when built with LIBJPEG.
See src/main-win.c on_save() function where it does rotate_and_save_jpeg_lossless().
Destroys data when specifically not allowed.
The main_win_save() should be split up to do the "Do you want to overwrite existing file?" dialog to separate function -- and that should be used if pref.ask_before_save is TRUE.