aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2004-07-30 02:03:25 +0000
committerFrederic Lepied <flepied@mandriva.com>2004-07-30 02:03:25 +0000
commit2764699e2c3135d678f88b469f3d1b49b25e6ab8 (patch)
treea67efbc72029ea7c8f66758f20d716c29a8b17a8 /share
parent5e765fdce931b421ae05966c1b9bae5bfcd3560c (diff)
downloadmsec-2764699e2c3135d678f88b469f3d1b49b25e6ab8.tar
msec-2764699e2c3135d678f88b469f3d1b49b25e6ab8.tar.gz
msec-2764699e2c3135d678f88b469f3d1b49b25e6ab8.tar.bz2
msec-2764699e2c3135d678f88b469f3d1b49b25e6ab8.tar.xz
msec-2764699e2c3135d678f88b469f3d1b49b25e6ab8.zip
fix directory creation code
Diffstat (limited to 'share')
-rw-r--r--share/ConfigFile.py4
1 files changed, 2 insertions, 2 deletions
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