summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gsettings/gsettings-data-convert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
index b0c8b9c8..eac6fd40 100644
--- a/gsettings/gsettings-data-convert.c
+++ b/gsettings/gsettings-data-convert.c
@@ -420,6 +420,7 @@ main (int argc, char *argv[])
struct stat statbuf;
GError *error;
gchar **converted;
+ gboolean changed;
GDir *dir;
const gchar *name;
gchar *filename;
@@ -448,6 +449,7 @@ main (int argc, char *argv[])
}
load_state (&stored_mtime, &converted);
+ changed = FALSE;
/* If the directory is not newer, exit */
if (stat (convert_dir, &statbuf) == 0)
@@ -497,6 +499,7 @@ main (int argc, char *argv[])
converted = g_realloc (converted, (len + 2) * sizeof (gchar *));
converted[len] = g_strdup (name);
converted[len + 1] = NULL;
+ changed = TRUE;
}
g_free (filename);
@@ -504,7 +507,7 @@ main (int argc, char *argv[])
next: ;
}
- if (!dry_run)
+ if (changed && !dry_run)
{
if (!save_state (converted))
return 1;