Skip to content

Commit

Permalink
fix info
Browse files Browse the repository at this point in the history
  • Loading branch information
huangnauh committed Nov 9, 2023
1 parent 0859c37 commit 90adb51
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ upx get -c /baima_text_auditer.tar
| args | 说明 |
| --------- | ---- |
| local-file | 本地的文件或文件夹 |
| url | 远端 url 文件 |
| remote-file | 需要保存到的远程文件路径或文件夹 |

| options | 说明 |
Expand All @@ -368,7 +369,7 @@ upx get -c /baima_text_auditer.tar
| -all | 上传包含目录下隐藏的文件和文件夹 |
#### 语法
```bash
upx put <local-file> [remote-file]
upx put <local-file>|<url> [remote-file]
```

#### 示例
Expand All @@ -383,7 +384,7 @@ upx put ./video /myfiles
```

## upload
> 上传文件或目录或 url 链接,支持多文件,文件名匹配
> 上传文件或目录,支持多文件,文件名匹配
| args | 说明 |
| --------- | ---- |
Expand Down
6 changes: 3 additions & 3 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func NewPutCommand() cli.Command {
return cli.Command{
Name: "put",
Usage: "Put directory or file",
ArgsUsage: "<local-path> [remote-path]",
ArgsUsage: "<local-path>|<url> [remote-path]",
Before: CreateInitCheckFunc(LOGIN, CHECK),
Action: func(c *cli.Context) error {
localPath := c.Args().First()
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 90adb51

Please sign in to comment.