Browse Source

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

Jelmer Vernooij 16 years ago
parent
commit
80f3bb3545
1 changed files with 2 additions and 1 deletions
  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: