Commit Graph

2 Commits

  • fix: prevent race condition in objectstore auth sync
    Remove os.RemoveAll() call in syncAuthFromBucket() that was causing
    a race condition with the file watcher.
    
    Problem:
    1. syncAuthFromBucket() wipes local auth directory with RemoveAll
    2. File watcher detects deletions and propagates them to remote store
    3. syncAuthFromBucket() then pulls from remote, but files are now gone
    
    Solution:
    Use incremental sync instead of delete-then-pull. Just ensure the
    directory exists and overwrite files as they're downloaded.
    This prevents the watcher from seeing spurious delete events.