diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-09-18 11:36:39 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-09-18 11:36:39 +0200 |
commit | 25aff60231b13be18cea1914ce06152c2982bc8e (patch) | |
tree | 0bfa3f0d71170dff962d9768c63681b5624ebbc9 /fb.py | |
parent | a1f172454d58a6ed8cf94223580e47a84ae2d3d0 (diff) |
fb.py: makedirs: Check if dir already exists
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.py')
-rwxr-xr-x | fb.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -408,10 +408,12 @@ class FBClient: functions[self.args.mode]() def makedirs(self, path): + dirname = os.path.dirname(path) try: - os.makedirs(os.path.dirname(path)) + os.makedirs(dirname) except OSError as e: - # FIXME: only catch dir already exists error + if not (os.path.exists(dirname) and os.path.isdir(dirname)): + raise pass def create_temp_copy_path(self, file): |