camget: actually check size of file on server

Also fix the other bug that was making the first bug only visible when
verbose :-)

http://camlistore.org/issue/526

Change-Id: Ia33bdc73a0eab4995f79abd7e9a37f08d3391f06
This commit is contained in:
mpl 2014-11-03 23:00:33 +01:00
parent 9b6a9c587a
commit 43e0b72ec4
1 changed files with 2 additions and 2 deletions

View File

@ -269,11 +269,11 @@ func smartFetch(src blob.Fetcher, targ string, br blob.Ref) error {
name := filepath.Join(targ, b.FileName())
if fi, err := os.Stat(name); err == nil && fi.Size() == fi.Size() {
if fi, err := os.Stat(name); err == nil && fi.Size() == fr.Size() {
if *flagVerbose {
log.Printf("Skipping %s; already exists.", name)
return nil
}
return nil
}
if *flagVerbose {