Selaa lähdekoodia

Don't use just the fact that the objects directory exists.

Jelmer Vernooij 16 vuotta sitten
vanhempi
commit
80f3bb3545
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      dulwich/repo.py

+ 2 - 1
dulwich/repo.py

@@ -214,7 +214,8 @@ class Repo(object):
         if os.path.isdir(os.path.join(root, ".git", OBJECTDIR)):
             self.bare = False
             self._controldir = os.path.join(root, ".git")
-        elif os.path.isdir(os.path.join(root, OBJECTDIR)):
+        elif (os.path.isdir(os.path.join(root, OBJECTDIR)) and
+              os.path.isdir(os.path.join(root, REFSDIR))):
             self.bare = True
             self._controldir = root
         else: