all: Serialize folder types to new names (#4942)

It's been a year and a half since we started accepting the new names.
It's time we start producing them.
This commit is contained in:
Jakob Borg
2018-05-13 09:58:00 +02:00
committed by GitHub
parent ed4807d9a4
commit 20aa53486a
5 changed files with 18 additions and 15 deletions

View File

@@ -79,7 +79,8 @@ func reportData(cfg configIntf, m modelIntf, connectionsService connectionsIntf,
var rescanIntvs []int
folderUses := map[string]int{
"readonly": 0,
"sendonly": 0,
"sendreceive": 0,
"ignorePerms": 0,
"ignoreDelete": 0,
"autoNormalize": 0,
@@ -91,8 +92,11 @@ func reportData(cfg configIntf, m modelIntf, connectionsService connectionsIntf,
for _, cfg := range cfg.Folders() {
rescanIntvs = append(rescanIntvs, cfg.RescanIntervalS)
if cfg.Type == config.FolderTypeSendOnly {
folderUses["readonly"]++
switch cfg.Type {
case config.FolderTypeSendOnly:
folderUses["sendonly"]++
case config.FolderTypeSendReceive:
folderUses["sendreceive"]++
}
if cfg.IgnorePerms {
folderUses["ignorePerms"]++