소스 검색

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

Jelmer Vernooij 16 년 전
부모
커밋
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: