]> git.sur5r.net Git - glabels/commitdiff
No longer changes labels filename and modification status if save fails.
authorJim Evins <evins@snaught.com>
Tue, 3 Sep 2002 14:45:09 +0000 (14:45 +0000)
committerJim Evins <evins@snaught.com>
Tue, 3 Sep 2002 14:45:09 +0000 (14:45 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@81 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/xml-label.c

index 9c36c529a7008638ed20ef913b9fdc69b46f0b52..6bc0f890a446b6623ef9390d58616e8857ce2874 100644 (file)
@@ -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");
 }