From 337b09d389950edd253457432ab4c3bde2fdf5a4 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 10 Jul 2010 11:03:46 +0200 Subject: [PATCH] create ~/.config and ~/.cache folder if they don't exist --- src/common/check_paths.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/check_paths.py b/src/common/check_paths.py index 456bc0e3e..33368ebe1 100644 --- a/src/common/check_paths.py +++ b/src/common/check_paths.py @@ -334,5 +334,10 @@ def check_and_possibly_create_paths(): sys.exit() def create_path(directory): + head, tail = os.path.split(directory) + if not os.path.exists(head): + create_path(head) + if os.path.exists(directory): + return print _('creating %s directory') % directory os.mkdir(directory, 0700)