Commit dc604fa2 authored by Michael Murtaugh's avatar Michael Murtaugh
Browse files

make last_modification optional (empty folder)

parent 3d90e5e7
......@@ -196,7 +196,8 @@ def make_folder_meta (target, source, env):
d['total_folders'] = total_folders + folders # nb: totals includes this folder's direct contents as well
d['total_files'] = total_files + files
d['total_files_by_ext'] = total_files_by_ext
d['last_modification'] = last_modification.isoformat()
if last_modification:
d['last_modification'] = last_modification.isoformat()
os.makedirs(os.path.split(tpath)[0], exist_ok=True)
with open(tpath, "w") as f:
json.dump(d, f, indent=2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment