lib/config: Set DisableTempIndexes to true on receive-encrypted (#7701)
This commit is contained in:
@@ -1343,3 +1343,30 @@ func TestInternalVersioningConfiguration(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestReceiveEncryptedFolderFixed(t *testing.T) {
|
||||
cfg := Configuration{
|
||||
Folders: []FolderConfiguration{
|
||||
{
|
||||
ID: "foo",
|
||||
Path: "testdata",
|
||||
Type: FolderTypeReceiveEncrypted,
|
||||
DisableTempIndexes: false,
|
||||
IgnorePerms: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
cfg.prepare(device1)
|
||||
|
||||
if len(cfg.Folders) != 1 {
|
||||
t.Fatal("Expected one folder")
|
||||
}
|
||||
f := cfg.Folders[0]
|
||||
if !f.DisableTempIndexes {
|
||||
t.Error("DisableTempIndexes should be true")
|
||||
}
|
||||
if !f.IgnorePerms {
|
||||
t.Error("IgnorePerms should be true")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user