[epiphany] file-helpers: Only write the migration version when creating the dot dir



commit 57b67b27fef572324f0cd016004667ca328733c7
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Tue Nov 10 09:07:13 2015 +0100

    file-helpers: Only write the migration version when creating the dot dir
    
    ephy_ensure_dir_exists() is supposed to be generic function, not only to
    ensure dot dir exists. We don't want to create the migration version
    file every time a new directory is created.

 lib/ephy-file-helpers.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 1ef4118..0d8b85c 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -480,11 +480,14 @@ ephy_ensure_dir_exists (const char *dir,
        {
                if (g_mkdir_with_parents (dir, 488) == 0)
                {
-                       /* We need to set the .migrated file to the
-                        * current profile migration version,
-                        * otherwise the next time the browser runs
-                        * things might go awry. */
-                       ephy_profile_utils_set_migration_version (EPHY_PROFILE_MIGRATION_VERSION);
+                       if (dir == ephy_dot_dir ())
+                       {
+                               /* We need to set the .migrated file to the
+                                * current profile migration version,
+                                * otherwise the next time the browser runs
+                                * things might go awry. */
+                               ephy_profile_utils_set_migration_version (EPHY_PROFILE_MIGRATION_VERSION);
+                       }
                }
                else
                {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]