Skip to content

Commit

Permalink
move smudge message before the download actually starts
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Mar 22, 2015
1 parent 3f1bd97 commit 2f8d1fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pointer/smudge.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ func Smudge(writer io.Writer, ptr *Pointer, workingfile string, cb lfs.CopyCallb
}

func downloadFile(writer io.Writer, ptr *Pointer, workingfile, mediafile string, cb lfs.CopyCallback) *lfs.WrappedError {
fmt.Fprintf(os.Stderr, "Downloading %s (%s)\n", workingfile, pb.FormatBytes(ptr.Size))
reader, size, wErr := lfs.Download(filepath.Base(mediafile))
if reader != nil {
defer reader.Close()
}

fmt.Fprintf(os.Stderr, "Downloading %s (%s)\n", workingfile, pb.FormatBytes(ptr.Size))

if wErr != nil {
wErr.Errorf("Error downloading %s.", mediafile)
return wErr
Expand Down

0 comments on commit 2f8d1fc

Please sign in to comment.