Merge branch 'main' into v2

* main:
  fix(syncthing): ensure both config and data dirs exist at startup (fixes #10126) (#10127)
  fix(versioner): fix perms of created folders (fixes #9626) (#10105)
  refactor: use slices.Contains to simplify code (#10121)
This commit is contained in:
Jakob Borg
2025-05-25 10:00:53 +02:00
6 changed files with 164 additions and 31 deletions
+5 -8
View File
@@ -18,6 +18,7 @@ import (
"os"
"path/filepath"
"runtime/pprof"
"slices"
"sort"
"strconv"
"strings"
@@ -1254,10 +1255,8 @@ func TestAutoAcceptPausedWhenFolderConfigChanged(t *testing.T) {
} else if fcfg.Path != idOther {
t.Error("folder path changed")
} else {
for _, dev := range fcfg.DeviceIDs() {
if dev == device1 {
return
}
if slices.Contains(fcfg.DeviceIDs(), device1) {
return
}
t.Error("device missing")
}
@@ -1303,10 +1302,8 @@ func TestAutoAcceptPausedWhenFolderConfigNotChanged(t *testing.T) {
} else if fcfg.Path != idOther {
t.Error("folder path changed")
} else {
for _, dev := range fcfg.DeviceIDs() {
if dev == device1 {
return
}
if slices.Contains(fcfg.DeviceIDs(), device1) {
return
}
t.Error("device missing")
}