Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

config: avoid remote with empty name from environment

albertony8d2907d8f5bd
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.