From 8d2907d8f5bd2ce7d6ddc53b645c491048a413fe Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sat, 4 Nov 2023 11:16:06 +0100 Subject: [PATCH] config: avoid remote with empty name from environment --- fs/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/config/config.go b/fs/config/config.go index c4a56f096..0e6349376 100644 --- a/fs/config/config.go +++ b/fs/config/config.go @@ -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.