create ~/.config if not exist
This commit is contained in:
parent
0ac441d132
commit
76029d6389
1 changed files with 4 additions and 1 deletions
|
@ -58,7 +58,10 @@ class WorkdirFS(Operations):
|
||||||
def _xdg(self):
|
def _xdg(self):
|
||||||
foundarchive=False
|
foundarchive=False
|
||||||
foundwork=False
|
foundwork=False
|
||||||
xdguserdirs = os.environ['HOME']+'/.config/user-dirs.dirs'
|
xdgdir = os.environ['HOME']+'/.config'
|
||||||
|
xdguserdirs = os.path.join(xdgdir, '/user-dirs.dirs')
|
||||||
|
if not os.path.exists(xdgdir):
|
||||||
|
os.mkdir(xdgdir)
|
||||||
try:
|
try:
|
||||||
with fileinput.input(xdguserdirs, inplace=True) as fh:
|
with fileinput.input(xdguserdirs, inplace=True) as fh:
|
||||||
for line in fh:
|
for line in fh:
|
||||||
|
|
Loading…
Reference in a new issue