mirror of
https://github.com/teest114514/chatlog_alpha.git
synced 2026-04-03 18:48:13 +08:00
Introduced a sync.Map of mutexes in FileCopyManager to serialize concurrent file copy operations for the same file cache key. Updated GetTempCopy to use double-checked locking, ensuring only one goroutine creates or updates a cached file at a time. Improved atomicCopyFile to handle destination file existence gracefully, avoiding errors when concurrent processes create the same file.