Skip to content

Commit

Permalink
Fix/pr issue on system test (#329)
Browse files Browse the repository at this point in the history
* fix(test):fixed pr issue on system_test

* fix(share): 0chain/zboxcli#145 fixed getFileStats bug for folder
  • Loading branch information
renaswift063 committed Dec 26, 2021
1 parent 619577a commit 2aeb668
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zboxcore/sdk/downloadworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (req *DownloadRequest) processDownload(ctx context.Context) {

if fileRef.Type == fileref.DIRECTORY {
if req.statusCallback != nil {
req.statusCallback.Error(req.allocationID, remotePathCallback, OpDownload, errors.New("", "Cannot download directory"))
req.statusCallback.Error(req.allocationID, remotePathCallback, OpDownload, errors.New("", "please get files from folder, and download them one by one"))
}
return
}
Expand Down
6 changes: 4 additions & 2 deletions zboxcore/sdk/filestatsworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (req *ListRequest) getFileStatsInfoFromBlobber(blobber *blockchain.StorageN
fileStats.BlobberURL = blobber.Baseurl
return nil
}
return err
return errors.New(resp.Status, s.String())
})
}

Expand All @@ -116,7 +116,9 @@ func (req *ListRequest) getFileStatsFromBlobbers() map[string]*FileStats {
fileInfos := make(map[string]*FileStats)
for i := 0; i < numList; i++ {
ch := <-rspCh
fileInfos[ch.filestats.BlobberID] = ch.filestats
if ch.err == nil {
fileInfos[ch.filestats.BlobberID] = ch.filestats
}
}
return fileInfos
}

0 comments on commit 2aeb668

Please sign in to comment.