summaryrefslogtreecommitdiffstats
path: root/fb.py
diff options
context:
space:
mode:
Diffstat (limited to 'fb.py')
-rwxr-xr-xfb.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/fb.py b/fb.py
index 2d057e2..fc0d73b 100755
--- a/fb.py
+++ b/fb.py
@@ -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):