Skip to content

Commit 9d6b6dc

Browse files
author
hauntsaninja
committed
allow cache metadata to point to directory
1 parent 63a93f1 commit 9d6b6dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/build.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,8 @@ def validate_meta(meta: Optional[CacheMeta], id: str, path: Optional[str],
13031303
st = manager.get_stat(path)
13041304
except OSError:
13051305
return None
1306-
if not stat.S_ISREG(st.st_mode):
1307-
manager.log('Metadata abandoned for {}: file {} does not exist'.format(id, path))
1306+
if not stat.S_ISDIR(st.st_mode) and not stat.S_ISREG(st.st_mode):
1307+
manager.log('Metadata abandoned for {}: file or directory {} does not exist'.format(id, path))
13081308
return None
13091309

13101310
manager.add_stats(validate_stat_time=time.time() - t0)

0 commit comments

Comments
 (0)