summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-07-11 11:50:14 +1200
committerLars Wirzenius <liw@liw.fi>2010-07-11 11:50:14 +1200
commit46d568dda6f951ec86d90ab24d44c57f30de1361 (patch)
tree41724592666ae11f50b72c304b9db89601e7426a
parent4ec2f803b31b028dd1006ed2e15d91e01a9457b3 (diff)
downloadobnam-46d568dda6f951ec86d90ab24d44c57f30de1361.tar.gz
Fix makedirs to not create parent if it exists already.
-rw-r--r--obnamlib/plugins/sftp_plugin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/obnamlib/plugins/sftp_plugin.py b/obnamlib/plugins/sftp_plugin.py
index e9f63367..65655d11 100644
--- a/obnamlib/plugins/sftp_plugin.py
+++ b/obnamlib/plugins/sftp_plugin.py
@@ -187,7 +187,7 @@ class SftpFS(obnamlib.VirtualFileSystem):
@ioerror_to_oserror
def makedirs(self, pathname):
parent = os.path.dirname(pathname)
- if parent and parent != pathname:
+ if parent and parent != pathname and not self.exists(parent):
self.makedirs(parent)
self.mkdir(pathname)