Remotes are only supported on UNIX systems which use slashes as path
separators so this had no direct effect. Change it to make the code more
obvious.
This was forgotten in
afb7e8e (safcm: use only slash separated paths for
the configuration, 2021-05-13).
package sync
import (
- "path/filepath"
+ slashpath "path"
"strings"
"ruderich.org/simon/safcm"
// more specific triggers can override effects of less specific ones (first
// "/" or ".", then the parents and finally path itself).
func triggerPaths(path string) []string {
- sep := string(filepath.Separator)
+ // Slash separated paths are used for the configuration
+ const sep = "/"
if path == sep || path == "." {
return []string{path}
}
var res []string
for i := 0; i < len(parts); i++ {
- res = append(res, filepath.Join(parts[:i+1]...))
+ res = append(res, slashpath.Join(parts[:i+1]...))
}
return res
}