create ~/.config if not exist

This commit is contained in:
Jakobus Schürz 2020-02-27 13:20:59 +01:00
parent 0ac441d132
commit 76029d6389

View file

@ -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: