MacOS: "-e filename/." returns true even for non-directories.

This has something to do with resource forks.  So use "-d filename/."
instead, which returns false if filename is not a directory.
This commit is contained in:
Avery Pennarun 2011-03-05 18:11:20 -08:00
commit c1a1f32445
5 changed files with 8 additions and 3 deletions

View file

@ -107,7 +107,7 @@ class BuildJob:
sf.set_checked()
sf.save()
return self._after2(0)
if (os.path.exists(t) and not os.path.exists(t + '/.')
if (os.path.exists(t) and not os.path.isdir(t + '/.')
and not sf.is_generated):
# an existing source file that was not generated by us.
# This step is mentioned by djb in his notes.