After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 594217 - transmageddon should use XDG folders
transmageddon should use XDG folders
Status: RESOLVED FIXED
Product: transmageddon
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: 0.10
Assigned To: Christian Fredrik Kalager Schaller
Christian Fredrik Kalager Schaller
Depends on: 328679
Blocks: 523057
 
 
Reported: 2009-09-05 10:55 UTC by Stuart Langridge
Modified: 2011-12-09 14:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stuart Langridge 2009-09-05 10:55:11 UTC
Transmageddon should use the XDG folders to look for profiles and so on, via the xdg.BaseDirectory module, rather than ~/.transmageddon.
Comment 1 Stuart Langridge 2009-09-05 14:32:28 UTC
Patch:

--- original/src/utils.py	2009-06-13 00:12:39.000000000 +0100
+++ patched/src/utils.py	2009-09-05 15:31:41.000000000 +0100
@@ -28,6 +28,7 @@
 import logging
 import os
 import sys
+import xdg.BaseDirectory
 
 _ = gettext.gettext
 
@@ -39,7 +40,9 @@
         @return: A list of paths to search in the order they will be searched
     """
     return [
+        xdg.BaseDirectory.save_data_path("transmageddon"),
         os.getcwd(),
         os.path.expanduser(os.path.join("~", ".transmageddon")),
         os.path.join(sys.prefix, "share", "transmageddon"),
Comment 2 Christian Fredrik Kalager Schaller 2009-09-06 13:47:18 UTC
there is probably a glib function for this too, I'll check
Comment 3 antistress 2011-04-02 23:32:52 UTC
i don't know if it's what you're looking for but glib has a simlar bug report (see Bug 328679)
Comment 4 Christian Fredrik Kalager Schaller 2011-12-09 14:13:23 UTC
Ok, giving up on these actually ever going into glib. Patch merged Stuart, took only 2 years :)
Comment 5 Christian Fredrik Kalager Schaller 2011-12-09 14:35:00 UTC
And just as I have given up it turns out they are in glib :) Ok, new updated pushed using glib functions instead of xdg :)