Skip to content

Commit

Permalink
fix sphinx-doc#440 sphinx-doc#1008 : coarse timestamp resolution in s…
Browse files Browse the repository at this point in the history
…ome filesystem generate wrong outdated file-list
  • Loading branch information
shimizukawa committed Oct 29, 2012
1 parent bee7f8b commit 718993a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sphinx/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,12 @@ def read(self_):
app.emit('doctree-read', doctree)

# store time of build, for outdated files detection
self.all_docs[docname] = time.time()
# note::
# Some filesystem's have coarse timestamp resolution.
# Therefore time.time() is older than filesystem's timestamp.
# ex. FAT32 have 2sec resolution.
self.all_docs[docname] = max(
time.time(), path.getmtime(self.doc2path(docname)))

if self.versioning_condition:
# get old doctree
Expand Down

0 comments on commit 718993a

Please sign in to comment.