git-p4: check for existence of repo dir before trying to create
[gitweb.git] / contrib / fast-import / git-p4
index e380c149b48bb72ccbc28da9f97be7127e29874a..cababc7fc898bd34ae8ceb7102adda4dfa7ceacd 100755 (executable)
@@ -1400,7 +1400,8 @@ class P4Clone(P4Sync):
             self.cloneDestination = self.defaultDestination(args)
 
         print "Importing from %s into %s" % (', '.join(depotPaths), self.cloneDestination)
-        os.makedirs(self.cloneDestination)
+        if not os.path.exists(self.cloneDestination):
+            os.makedirs(self.cloneDestination)
         os.chdir(self.cloneDestination)
         system("git init")
         self.gitdir = os.getcwd() + "/.git"