Skip to content

Commit

Permalink
修复上传文件名不正确的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
iikira committed Apr 14, 2018
1 parent a1861dd commit 942e053
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/pcscommand/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ func RunUpload(localPaths []string, savePath string) {
globedPathDir = filepath.Dir(globedPaths[k2])
}

// 避免去除文件名开头的"."
if globedPathDir == "." {
globedPathDir = ""
}

subSavePath = strings.TrimPrefix(walkedFiles[k3], globedPathDir)

lastID++
Expand Down

0 comments on commit 942e053

Please sign in to comment.