mirror of
https://github.com/rclone/rclone.git
synced 2025-01-11 00:40:03 +01:00
cmd: refactor to use fspath.SplitFs instead of fs.ParseRemote #4996
This commit is contained in:
parent
f17d7c0012
commit
28f6efe955
@ -84,7 +84,7 @@ func ShowVersion() {
|
|||||||
// It returns a string with the file name if points to a file
|
// It returns a string with the file name if points to a file
|
||||||
// otherwise "".
|
// otherwise "".
|
||||||
func NewFsFile(remote string) (fs.Fs, string) {
|
func NewFsFile(remote string) (fs.Fs, string) {
|
||||||
_, _, fsPath, err := fs.ParseRemote(remote)
|
_, fsPath, err := fspath.SplitFs(remote)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fs.CountError(err)
|
err = fs.CountError(err)
|
||||||
log.Fatalf("Failed to create file system for %q: %v", remote, err)
|
log.Fatalf("Failed to create file system for %q: %v", remote, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user