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:
parent
b62d08d136
commit
973e3d6a7b
5 changed files with 13 additions and 8 deletions
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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue