[gnome-commander] Remove migration from old to new config path, prepare commit for creating new directory



commit b6e4aefe2eb4a8517e2bff8a73046acc3ea5aaa0
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sat Oct 9 11:06:24 2021 +0200

    Remove migration from old to new config path, prepare commit for creating new directory

 src/main.cc  | 15 +++------------
 src/utils.cc | 11 -----------
 src/utils.h  |  2 --
 3 files changed, 3 insertions(+), 25 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index 39cf8ec1..7e368353 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -122,20 +122,11 @@ int main (int argc, char *argv[])
     gdk_rgb_init ();
     gnome_vfs_init ();
 
-
-    // ToDo: Remove somewhen after 1.10 release:
-    ///////////////////////////////////
-    auto userConfigDirOld = g_build_filename (g_get_home_dir (), "." PACKAGE, nullptr);
-
-    if (is_dir_existing(userConfigDirOld) == 1)
+    gchar *conf_dir = get_package_config_dir();
+    if (!is_dir_existing(conf_dir))
     {
-        auto userPluginConfigDirNew = get_package_config_dir();
-        move_old_to_new_location(userConfigDirOld, userPluginConfigDirNew);
+        create_dir (conf_dir);
     }
-    ///////////////////////////////////
-
-    gchar *conf_dir = get_package_config_dir();
-    create_dir_if_needed (conf_dir);
     g_free (conf_dir);
 
     /* Load Settings */
diff --git a/src/utils.cc b/src/utils.cc
index fceae8a7..b66ac583 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1077,17 +1077,6 @@ gint get_string_pixel_size (const char *s, int len)
 }
 
 
-gboolean move_old_to_new_location(const gchar* oldPath, const gchar* newPath)
-{
-    if (rename(oldPath, newPath) == 0)
-    {
-        return TRUE;
-    }
-    g_warning (_("Couldn’t move path from “%s” to “%s”: %s"), oldPath, newPath, strerror (errno));
-
-    return FALSE;
-}
-
 gchar* get_package_config_dir()
 {
     return g_build_filename (g_get_user_config_dir(), PACKAGE, NULL);
diff --git a/src/utils.h b/src/utils.h
index 72459282..d731cf80 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -399,8 +399,6 @@ inline std::string join(const COLL<T, Compare, Allocator> &coll, const std::stri
 
 gint get_string_pixel_size (const char *s, int len);
 
-gboolean move_old_to_new_location(const gchar* oldPath, const gchar* newPath);
-
 gchar* get_package_config_dir();
 
 gchar *string_double_underscores (const gchar *string);


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