2
0
Эх сурвалжийг харах

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

Jelmer Vernooij 16 жил өмнө
parent
commit
3181fba5c9
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  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: