mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
config: Make fs.ConfigFileGet return an exists flag
This commit is contained in:
5
fs/fs.go
5
fs/fs.go
@@ -790,9 +790,10 @@ func MustFind(name string) *RegInfo {
|
||||
func ParseRemote(path string) (fsInfo *RegInfo, configName, fsPath string, err error) {
|
||||
configName, fsPath = fspath.Parse(path)
|
||||
var fsName string
|
||||
var ok bool
|
||||
if configName != "" {
|
||||
fsName = ConfigFileGet(configName, "type")
|
||||
if fsName == "" {
|
||||
fsName, ok = ConfigFileGet(configName, "type")
|
||||
if !ok {
|
||||
return nil, "", "", ErrorNotFoundInConfigFile
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user