diff --git a/hggit/gitdirstate.py b/hggit/gitdirstate.py
index 7a3caae2567d3fd6780772d48e87a1fbdd83dedb_aGdnaXQvZ2l0ZGlyc3RhdGUucHk=..f340b95ed9c85ee39ecb8f583c2aef51ca564d48_aGdnaXQvZ2l0ZGlyc3RhdGUucHk= 100644
--- a/hggit/gitdirstate.py
+++ b/hggit/gitdirstate.py
@@ -99,12 +99,8 @@
                 files.append(util.expandpath(path))
         patterns = []
         # Only use .gitignore if there's no .hgignore
-        try:
-            fp = open(files[0], 'rb')
-            fp.close()
-        except:
-            fns = self._finddotgitignores()
-            for fn in fns:
+        if not os.access(files[0], os.R_OK):
+            for fn in self._finddotgitignores():
                 d = os.path.dirname(fn)
                 fn = self.pathto(fn)
                 if not os.path.exists(fn):