1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

rc: fix rc/uploadfile only working for root of the fs

This commit is contained in:
Chaitanya Bankanhal
2020-08-10 21:39:46 +05:30
committed by GitHub
parent 01280798e9
commit 61c7ea4085
2 changed files with 29 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import (
"mime"
"mime/multipart"
"net/http"
"path"
"strings"
"time"
@@ -253,7 +254,7 @@ func rcSingleCommand(ctx context.Context, in rc.Params, name string, noRemote bo
return nil, err
}
if p.FileName() != "" {
obj, err := Rcat(ctx, f, p.FileName(), p, time.Now())
obj, err := Rcat(ctx, f, path.Join(remote, p.FileName()), p, time.Now())
if err != nil {
return nil, err
}