Skip to content

Commit 0b2250d

Browse files
authored
FIX: fixing mtime bug (jupyter-book#1153)
1 parent fe457fe commit 0b2250d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jupyter_book/commands/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,10 @@ def build(
228228
)
229229

230230
# Check whether the table of contents has changed. If so we rebuild all
231-
if toc and BUILD_PATH.joinpath(".doctrees").exists():
231+
build_files = list(BUILD_PATH.joinpath(".doctrees").rglob("*"))
232+
if toc and build_files:
232233
toc_modified = toc.stat().st_mtime
233-
build_files = BUILD_PATH.rglob(".doctrees/*")
234+
234235
build_modified = max([os.stat(ii).st_mtime for ii in build_files])
235236

236237
# If the toc file has been modified after the build we need to force rebuild

0 commit comments

Comments
 (0)