Fixing LP#247893

XDG_CONFIG_HOME is not properly handled
This commit is contained in:
Emmanuel Bretelle 2008-07-12 15:35:36 +01:00
parent 8c8cdb1e09
commit 9d97e21aa8
1 changed files with 5 additions and 5 deletions

View File

@ -153,11 +153,11 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore):
self.type = "RCFile" self.type = "RCFile"
try: try:
directory = os.environ['XDG_CONFIG_HOME'] directory = os.environ['XDG_CONFIG_HOME']
except: except KeyError, e:
directory = os.path.join (os.path.expanduser("~"), ".config/terminator/") dbg("Environment variable %s not found. defaulting to ~/.config" % e.message)
directory = os.path.join (os.path.expanduser("~"), ".config")
self.rcfilename = os.path.join(directory, "config") self.rcfilename = os.path.join(directory, "terminator/config")
dbg("[RCFile] located at %s" % self.rcfilename)
if os.path.exists (self.rcfilename): if os.path.exists (self.rcfilename):
rcfile = open (self.rcfilename) rcfile = open (self.rcfilename)
rc = rcfile.readlines () rc = rcfile.readlines ()