From 2764699e2c3135d678f88b469f3d1b49b25e6ab8 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Fri, 30 Jul 2004 02:03:25 +0000 Subject: fix directory creation code --- share/ConfigFile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share/ConfigFile.py') diff --git a/share/ConfigFile.py b/share/ConfigFile.py index d50e78f..349e52f 100644 --- a/share/ConfigFile.py +++ b/share/ConfigFile.py @@ -141,7 +141,7 @@ class ConfigFile: log(_('deleted %s') % (self.path,)) elif self.is_modified: content = string.join(self.lines, "\n") - mkdir_p(self.path) + mkdir_p(os.path.dirname(self.path)) file = open(self.path, 'w') file.write(content) file.close() @@ -438,6 +438,6 @@ def add_config_assoc(regex, action): def mkdir_p(path): if not os.path.exists(path): - os.makedirs(os.path.dirname(path)) + os.makedirs(path) # ConfigFile.py ends here -- cgit v1.2.1