You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
api_undo() (app.py ~line 8581) has two robustness issues:
Missing parent directory creation — If the original author folder was cleaned up after a rename (empty dir cleanup at ~line 6340), the undo shutil.move(new_path, old_path) fails because the parent directory no longer exists.
Bug
api_undo()(app.py ~line 8581) has two robustness issues:shutil.move(new_path, old_path)fails because the parent directory no longer exists.Fix
Add
Path(old_path).parent.mkdir(parents=True, exist_ok=True)before theshutil.move()call inapi_undo().Severity
Medium — undo silently fails when the original parent folder was cleaned up.
Found via code audit.