config: avoid remote with empty name from environment

This commit is contained in:
albertony
2024-08-08 13:41:31 +01:00
committed by Nick Craig-Wood
parent 1720d3e11c
commit 8d2907d8f5
+1 -1
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.