Skip to content

Commit

Permalink
fix blocks check
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitenjain14 committed Feb 26, 2024
1 parent 9f453a7 commit 3711d05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ var downloadCmd = &cobra.Command{
if thumbnail {
errE = allocationObj.DownloadThumbnail(localPath, remotePath, verifyDownload, statusBar, true)
} else {
if (startBlock != 0 || endBlock != 0) && startBlock < endBlock {
if startBlock != 0 || endBlock != 0 {
errE = allocationObj.DownloadFileByBlock(localPath, remotePath, startBlock, endBlock, numBlocks, verifyDownload, statusBar, true)
} else {
ds := sdk.CreateFsDownloadProgress()
Expand Down Expand Up @@ -242,7 +242,7 @@ func init() {
downloadCmd.PersistentFlags().String("multidownloadjson", "", "A JSON file containing multi download options")
downloadCmd.Flags().BoolP("thumbnail", "t", false, "(default false) pass this option to download only the thumbnail")

downloadCmd.Flags().Int64P("startblock", "s", 1,
downloadCmd.Flags().Int64P("startblock", "s", 0,
"Pass this option to download from specific block number. It should not be less than 1")
downloadCmd.Flags().Int64P("endblock", "e", 0, "pass this option to download till specific block number")
downloadCmd.Flags().IntP("blockspermarker", "b", 10, "pass this option to download multiple blocks per marker")
Expand Down

0 comments on commit 3711d05

Please sign in to comment.