]> pilppa.org Git - uci.git/blobdiff - file.c
only overwrite config files at commit time when actual changes were made
[uci.git] / file.c
diff --git a/file.c b/file.c
index c0141acd17964863f47e5c8b2447a49b89895802..bc6b5a9fb573a45c63471fda82bf5671e4f00533 100644 (file)
--- a/file.c
+++ b/file.c
@@ -676,10 +676,12 @@ int uci_commit(struct uci_context *ctx, struct uci_package **package, bool overw
                        path = NULL;
 
                        /* check for updated history, flush */
-                       uci_load_history(ctx, p, true);
+                       if (!uci_load_history(ctx, p, true))
+                               goto done;
                } else {
                        /* flush history */
-                       uci_load_history(ctx, NULL, true);
+                       if (!uci_load_history(ctx, NULL, true))
+                               goto done;
                }
        }