lib/model: Allow empty subdirs in scan request (fixes #3829)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3833
This commit is contained in:
committed by
Audrius Butkevicius
parent
ba17cc0a11
commit
226da976dc
@@ -2181,6 +2181,21 @@ func TestIssue3804(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIssue3829(t *testing.T) {
|
||||
dbi := db.OpenMemory()
|
||||
m := NewModel(defaultConfig, protocol.LocalDeviceID, "device", "syncthing", "dev", dbi, nil)
|
||||
m.AddFolder(defaultFolderConfig)
|
||||
m.StartFolder("default")
|
||||
m.ServeBackground()
|
||||
defer m.Stop()
|
||||
|
||||
// Empty subdirs should be accepted
|
||||
|
||||
if err := m.ScanFolderSubdirs("default", []string{""}); err != nil {
|
||||
t.Error("Unexpected error:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRootedJoinedPath(t *testing.T) {
|
||||
type testcase struct {
|
||||
root string
|
||||
|
||||
Reference in New Issue
Block a user