From 90adb5170dedf8a31eb5a95aa6244af049fcfc57 Mon Sep 17 00:00:00 2001 From: Libo Huang Date: Thu, 9 Nov 2023 17:18:07 +0800 Subject: [PATCH] fix info --- README.md | 5 +++-- commands.go | 6 +++--- session.go | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9d1fa31..bcb7ddb 100644 --- a/README.md +++ b/README.md @@ -360,6 +360,7 @@ upx get -c /baima_text_auditer.tar | args | 说明 | | --------- | ---- | | local-file | 本地的文件或文件夹 | +| url | 远端 url 文件 | | remote-file | 需要保存到的远程文件路径或文件夹 | | options | 说明 | @@ -368,7 +369,7 @@ upx get -c /baima_text_auditer.tar | -all | 上传包含目录下隐藏的文件和文件夹 | #### 语法 ```bash -upx put [remote-file] +upx put | [remote-file] ``` #### 示例 @@ -383,7 +384,7 @@ upx put ./video /myfiles ``` ## upload -> 上传文件或目录或 url 链接,支持多文件,文件名匹配 +> 上传文件或目录,支持多文件,文件名匹配 | args | 说明 | | --------- | ---- | diff --git a/commands.go b/commands.go index 26651d1..c555264 100644 --- a/commands.go +++ b/commands.go @@ -326,7 +326,7 @@ func NewPutCommand() cli.Command { return cli.Command{ Name: "put", Usage: "Put directory or file", - ArgsUsage: " [remote-path]", + ArgsUsage: "| [remote-path]", Before: CreateInitCheckFunc(LOGIN, CHECK), Action: func(c *cli.Context) error { localPath := c.Args().First() @@ -361,8 +361,8 @@ func NewPutCommand() cli.Command { func NewUploadCommand() cli.Command { return cli.Command{ Name: "upload", - Usage: "upload multiple directory or file or http url", - ArgsUsage: "[local-path...] [url...] [--remote remote-path]", + Usage: "upload multiple directory or file", + ArgsUsage: "[local-path...] [--remote remote-path]", Before: CreateInitCheckFunc(LOGIN, CHECK), Action: func(c *cli.Context) error { if c.Int("w") > 10 || c.Int("w") < 1 { diff --git a/session.go b/session.go index 5678f24..5f44807 100644 --- a/session.go +++ b/session.go @@ -718,6 +718,7 @@ func (sess *Session) Put(localPath, upPath string, workers int, withIgnore bool) if err != nil { PrintErrorAndExit(err.Error()) } + return } localInfo, err := os.Stat(localPath)