Add a guard to is_map() to avoid some false positives.

This commit is contained in:
Eric S. Raymond 2007-08-27 09:29:45 +00:00
parent c0c5d8be99
commit 3399b52cc1

View file

@ -668,6 +668,8 @@ def hack_syntax(filename, lines):
def is_map(filename):
"Is this file a map in either old or new style?"
if isresource(filename) or '{' in filename or '}' in filename:
return False
has_map_name = "maps" in filename or filename.endswith(".map")
fp = open(filename)
lines = fp.readlines()