fix repository cloning
authorTimo Savola <tsavola@movial.fi>
Wed, 9 Jul 2008 13:23:26 +0000 (16:23 +0300)
committerTimo Savola <tsavola@movial.fi>
Wed, 9 Jul 2008 13:23:26 +0000 (16:23 +0300)
matrix/repositories.py

index c2fa48d..5a5f1de 100644 (file)
@@ -97,7 +97,10 @@ class Repository(object):
                if os.path.exists(self.path):
                        self.__clone_in_place(url)
                else:
-                       os.makedirs(os.path.split(self.path)[0])
+                       dirpath = os.path.dirname(self.path)
+                       if dirpath and not os.path.exists(dirpath):
+                               os.makedirs(dirpath)
+
                        git.clone(self.path, url, checkout=False)
 
                if self.exclude: