diff options
author | Chris Xiong <chirs241097@gmail.com> | 2024-07-25 03:41:45 -0400 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2024-07-25 03:41:45 -0400 |
commit | 2e8481b7739e04bc83b1780a3aaf3e44d5baae25 (patch) | |
tree | 7fd04f281787b0fa97924197eab2a6a313962b08 /utils/postutil.py | |
parent | b736068ee7b82e05c2ede8bc48ace7ffa4709e29 (diff) | |
download | notekins-2e8481b7739e04bc83b1780a3aaf3e44d5baae25.tar.xz |
Fix posts with images breaking regen.
Allow setting a time when making a post ("unsupported" feature).
Diffstat (limited to 'utils/postutil.py')
-rw-r--r-- | utils/postutil.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/postutil.py b/utils/postutil.py index c978d3e..f2e1a3d 100644 --- a/utils/postutil.py +++ b/utils/postutil.py @@ -142,7 +142,7 @@ def process_post(fn, is_updating): if destm is None: d = datetime.fromtimestamp(ts, tz=timezone.utc) destm = os.path.join("media_orig", str(d.year)) - destm = os.path.join(destm, f"{ts}-{os.path.basename(fn)}") + destm = os.path.join(destm, f"{ts}-{os.path.basename(m)}") if not os.path.isfile(os.path.join(conf.LOCAL_DATA_ROOT, destm)): raise FileNotFoundError(f"Cannot find original media ({destm})") thumbnail = None |