From 43e0b72ec49ac9a0eac60392a68b11eef095374f Mon Sep 17 00:00:00 2001 From: mpl Date: Mon, 3 Nov 2014 23:00:33 +0100 Subject: [PATCH] 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 --- cmd/camget/camget.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/camget/camget.go b/cmd/camget/camget.go index e2434f8d3..36c33ce22 100644 --- a/cmd/camget/camget.go +++ b/cmd/camget/camget.go @@ -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 {