feat: add filemanager session and crypto version detection (#516)

* feat: add filemanager session and crypto version detection

* refactor: move copy logic into filemanager, remove fileutil dependency

* fix: apply review suggestions for filemanager

* feat: add Windows locked file tests, fix readFileContent with ReadFile+FileMapping fallback

* fix: remove self-PID skip in findFileHandle to fix Windows CI test

* fix: seek to file start before reading duplicated handle

* fix: use full path matching in findFileHandle to avoid cross-app handle collision

* test: enhance Windows copyLocked tests with write-then-read, large file, and normal copy scenarios

* fix: check all errors in Windows tests, use bytes.Equal for large file comparison

* fix: use stable path suffix matching to handle Windows short path names in CI
This commit is contained in:
Roger
2026-03-25 23:54:22 +08:00
committed by moonD4rk
parent e86e3e62d6
commit 12436217ae
8 changed files with 809 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
//go:build !windows
package filemanager
import "fmt"
// copyLocked is not supported on non-Windows platforms and always returns an error.
// File locking is primarily a Windows issue where Chrome holds exclusive
// locks on Cookie files via SQLite WAL mode.
func copyLocked(_, _ string) error {
return fmt.Errorf("locked file copy not supported on this platform")
}