From: Jim Evins Date: Tue, 3 Sep 2002 14:45:09 +0000 (+0000) Subject: No longer changes labels filename and modification status if save fails. X-Git-Tag: glabels-2_3_0~803 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=131d154d86af37e82cb3baf1274fcab2706a4c63;p=glabels No longer changes labels filename and modification status if save fails. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@81 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/src/xml-label.c b/glabels2/src/xml-label.c index 9c36c529..6bc0f890 100644 --- a/glabels2/src/xml-label.c +++ b/glabels2/src/xml-label.c @@ -37,6 +37,7 @@ #include "label-barcode.h" #include "template.h" #include "xml-label.h" +#include "xml-label-04.h" #include "util.h" #include "debug.h" @@ -652,12 +653,16 @@ gl_xml_label_save (glLabel *label, xml_ret = xmlSaveFormatFile (filename, doc, TRUE); xmlFreeDoc (doc); if (xml_ret == -1) { + g_warning (_("Problem saving xml file.")); *status = XML_LABEL_ERROR_SAVE_FILE; - } - gl_label_set_filename (label, filename); - gl_label_clear_modified (label); + } else { + + gl_label_set_filename (label, filename); + gl_label_clear_modified (label); + + } gl_debug (DEBUG_XML, "END"); }