Fixing LP#247893
XDG_CONFIG_HOME is not properly handled
This commit is contained in:
parent
8c8cdb1e09
commit
9d97e21aa8
@ -153,11 +153,11 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore):
|
||||
self.type = "RCFile"
|
||||
try:
|
||||
directory = os.environ['XDG_CONFIG_HOME']
|
||||
except:
|
||||
directory = os.path.join (os.path.expanduser("~"), ".config/terminator/")
|
||||
|
||||
self.rcfilename = os.path.join(directory, "config")
|
||||
|
||||
except KeyError, e:
|
||||
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, "terminator/config")
|
||||
dbg("[RCFile] located at %s" % self.rcfilename)
|
||||
if os.path.exists (self.rcfilename):
|
||||
rcfile = open (self.rcfilename)
|
||||
rc = rcfile.readlines ()
|
||||
|
Loading…
Reference in New Issue
Block a user