mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 09:30:03 +02:00
backends: make sure backends expand ~ and environment vars in file names they use
See: https://forum.rclone.org/t/relative-path-in-rclone-config-service-account-json/16693
This commit is contained in:
3
lib/env/env.go
vendored
3
lib/env/env.go
vendored
@@ -7,6 +7,9 @@ import (
|
||||
homedir "github.com/mitchellh/go-homedir"
|
||||
)
|
||||
|
||||
// ShellExpandHelp describes what ShellExpand does for inclusion into help
|
||||
const ShellExpandHelp = "\n\nLeading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.\n"
|
||||
|
||||
// ShellExpand replaces a leading "~" with the home directory" and
|
||||
// expands all environment variables afterwards.
|
||||
func ShellExpand(s string) string {
|
||||
|
Reference in New Issue
Block a user