[sane-devel] bug in xsane-0.82 Viewer mode image save, with patch

larry@doolittle.boa.org larry@doolittle.boa.org
Sun, 23 Dec 2001 05:37:44 -0800


This patch to xsane-0.82 removes a duplicate call to xsane_create_secure_file(),
which otherwise causes image saves from "Viewer" mode to fail.

       - Larry

--- xsane-viewer.c.orig	Fri Dec  7 11:23:14 2001
+++ xsane-viewer.c	Sun Dec 23 05:34:03 2001
@@ -220,15 +220,6 @@
     gtk_progress_set_format_string(GTK_PROGRESS(v->progress_bar), PROGRESS_SAVING_DATA);
     gtk_progress_bar_update(GTK_PROGRESS_BAR(v->progress_bar), 0.0);
 
-    if (xsane_create_secure_file(outputfilename)) /* remove possibly existing symbolic links for security */
-    {
-     char buf[256];
-
-      snprintf(buf, sizeof(buf), "%s %s %s\n", ERR_DURING_SAVE, ERR_CREATE_SECURE_FILE, outputfilename);
-      xsane_back_gtk_error(buf, TRUE);
-     return; /* error */
-    }
-
     xsane_save_image_as(inputfilename, outputfilename, output_format, v->progress_bar, &v->cancel_save);
 
     gtk_progress_set_format_string(GTK_PROGRESS(v->progress_bar), "");