diff src/libaudacious/configdb_rcfile.c @ 2325:63c9a2724e73 trunk

[svn] - revert r3646 because it is not a user-friendly method of transitioning. pre-r3646 produces the proper behaviour defined by XDG for migration.
author nenolod
date Sat, 13 Jan 2007 15:04:38 -0800
parents ac9f4d42d848
children 094cac62c904
line wrap: on
line diff
--- a/src/libaudacious/configdb_rcfile.c	Sat Jan 13 14:49:55 2007 -0800
+++ b/src/libaudacious/configdb_rcfile.c	Sat Jan 13 15:04:38 2007 -0800
@@ -51,8 +51,22 @@
 
     db->file = bmp_rcfile_open(db->filename);
 
-    if (!db->file)
+#ifdef DOTAUDACIOUS_COMPAT
+    if (!db->file) {
+        tmp = g_build_filename(g_get_home_dir(), BMP_RCPATH, "config", NULL);
+        if (db->file = bmp_rcfile_open(tmp)) {
+            g_free(db->filename);
+            db->filename = tmp;
+        }
+    }
+#endif
+
+    if (!db->file) {
+#ifdef DOTAUDACIOUS_COMPAT
+        g_free(tmp);
+#endif
         db->file = bmp_rcfile_new();
+    }
 
     db->dirty = FALSE;