config: avoid remote with empty name from environment

This commit is contained in:
albertony 2023-11-04 11:16:06 +01:00 committed by Nick Craig-Wood
parent 1720d3e11c
commit 8d2907d8f5

View File

@ -637,7 +637,7 @@ func FileDeleteKey(section, key string) bool {
return LoadedData().DeleteKey(section, key)
}
var matchEnv = regexp.MustCompile(`^RCLONE_CONFIG_(.*?)_TYPE=.*$`)
var matchEnv = regexp.MustCompile(`^RCLONE_CONFIG_(.+?)_TYPE=.*$`)
// FileSections returns the sections in the config file
// including any defined by environment variables.