Skip to content

Commit

Permalink
Fix archive recreation if files are deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
aradi committed Nov 30, 2018
1 parent ab8d67d commit c49e407
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ def create_archives(app):
def _newest_modification_time(filepath):
'''Returns the newest modification time among all files within a folder.'''
import os
mtime = 0.0
mtime = os.lstat(filepath).st_mtime
for root, dirs, entries in os.walk(filepath):
for entry in entries:
for entry in dirs + entries:
entrypath = os.path.join(root, entry)
mtime = max(mtime, os.lstat(entrypath).st_mtime)
return mtime
Expand Down

0 comments on commit c49e407

Please sign in to comment.