cfb3ba5871
When the dev file-watcher and an upload endpoint both trigger merge_all on the same user directory at the same time, the shutil.rmtree/_merged/activities/ sequence collides: one thread deletes the directory while the other is mid-walk, causing ENOTEMPTY or ENOENT crashes. Added a per-user-dir threading.Lock (_merge_lock) at the top of merge.py so all callers (upload endpoints, watcher, admin rebuild) are serialized without changing any call site. Also made the rmtree ignore_errors=True and the symlink_to conditional to survive any stale leftover from a prior crash.