Symptôme
Suppression d'un fichier local → le fichier revient depuis le remote (delete-revert).
Root cause
handleLocalEvent construit le remote path avec :
remotePath := path.Join(e.remotePath, evt.Path)
Sur Windows, fsnotify retourne evt.Path avec des backslashes pour les fichiers dans des sous-dossiers (ex : subdir\file.txt). Le package path (Unix) traite le backslash comme un caractère de nom de fichier ordinaire → /remote/subdir\file.txt au lieu de /remote/subdir/file.txt → backend.Delete retourne 404 → remote conservé → le fichier revient au prochain scan.
Fix
internal/sync/engine.go handleLocalEvent :
remoteRelPath := filepath.ToSlash(evt.Path)
remotePath := path.Join(e.remotePath, remoteRelPath)
// Et pour ActionRename :
srcRemoteRelPath := filepath.ToSlash(evt.OldPath)
SrcRemotePath: path.Join(e.remotePath, srcRemoteRelPath)
Tests
TestEngine_HandleLocalEvent_BackslashPath_Delete, TestEngine_HandleLocalEvent_BackslashPath_Rename (Windows-only — skippés sur Linux CI)
Symptôme
Suppression d'un fichier local → le fichier revient depuis le remote (delete-revert).
Root cause
handleLocalEventconstruit le remote path avec :Sur Windows, fsnotify retourne
evt.Pathavec des backslashes pour les fichiers dans des sous-dossiers (ex :subdir\file.txt). Le packagepath(Unix) traite le backslash comme un caractère de nom de fichier ordinaire →/remote/subdir\file.txtau lieu de/remote/subdir/file.txt→ backend.Delete retourne 404 → remote conservé → le fichier revient au prochain scan.Fix
internal/sync/engine.go handleLocalEvent:Tests
TestEngine_HandleLocalEvent_BackslashPath_Delete,TestEngine_HandleLocalEvent_BackslashPath_Rename(Windows-only — skippés sur Linux CI)