Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuhaoQing committed Aug 28, 2024
1 parent edc313a commit 1a6ca08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/record/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ func NewDownloadCommand(cfgPath *string) *cobra.Command {
fmt.Printf("Saving to %s\n", dstDir)

successCount := 0
for _, f := range files {
for fIdx, f := range files {
fileName, _ := name.NewFile(f.Name)
localPath := filepath.Join(dstDir, fileName.Filename)
fmt.Printf("\nDownloading #%d file: %s\n", successCount+1, fileName.Filename)
fmt.Printf("\nDownloading #%d file: %s\n", fIdx+1, fileName.Filename)

if !strings.HasPrefix(localPath, dstDir+string(os.PathSeparator)) {
log.Errorf("illegal file name: %s", fileName.Filename)
Expand Down Expand Up @@ -120,7 +120,7 @@ func NewDownloadCommand(cfgPath *string) *cobra.Command {
successCount++
}

fmt.Printf("\nDownload completed! \nAll %d/%d files are saved to %s\n", successCount, len(files), dstDir)
fmt.Printf("\nDownload completed! \nAll %d / %d files are saved to %s\n", successCount, len(files), dstDir)
},
}

Expand Down

0 comments on commit 1a6ca08

Please sign in to comment.