Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/downloaddir.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ var downdirCmd = &cobra.Command{
wg := &sync.WaitGroup{}
statusBar := &StatusBar{wg: wg}
wg.Add(1)
if logFilePath != "" {
f, err := os.Create(logFilePath)
if err != nil {
PrintError("Error creating log file", err)
os.Exit(1)
}
defer f.Close()
statusBar.f = f
}
errE := allocationObj.DownloadDirectory(context.Background(), remotePath, localPath, authTicket, statusBar)
if errE == nil {
wg.Wait()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.22.5

require (
github.com/0chain/errors v1.0.3
github.com/0chain/gosdk v1.20.4
github.com/0chain/gosdk v1.20.6-0.20250411064406-02bfe6addfcc
github.com/icza/bitio v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/spf13/cobra v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ github.com/0chain/common v1.18.3 h1:42dYOv2KyMTSanuS67iDtfv+ErbSRqR8NJ3MG72MwaI=
github.com/0chain/common v1.18.3/go.mod h1:Lapu2Tj7z5Sm4r+X141e7vsz4NDODTEypeElYAP3iSw=
github.com/0chain/errors v1.0.3 h1:QQZPFxTfnMcRdt32DXbzRQIfGWmBsKoEdszKQDb0rRM=
github.com/0chain/errors v1.0.3/go.mod h1:xymD6nVgrbgttWwkpSCfLLEJbFO6iHGQwk/yeSuYkIc=
github.com/0chain/gosdk v1.20.4 h1:y3X61TK/ZHTsmp8mXUQtL3fQPVxhO/nBmJkq25opalU=
github.com/0chain/gosdk v1.20.4/go.mod h1:dwDhPmkbmcTqbOcTpFZqcuKPZBa7Eq79vz5bNLRtxxo=
github.com/0chain/gosdk v1.20.6-0.20250411064406-02bfe6addfcc h1:j/KOsqMKGy0hGeMripfjBb6SXGeEAfm6ktKOc8tnbJ0=
github.com/0chain/gosdk v1.20.6-0.20250411064406-02bfe6addfcc/go.mod h1:dwDhPmkbmcTqbOcTpFZqcuKPZBa7Eq79vz5bNLRtxxo=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
Expand Down
Loading