Skip to content

Commit

Permalink
Fixed format argument errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertchen committed May 24, 2018
1 parent aadd2aa commit f80a5b1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/duplicacy_acdstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func CreateACDStorage(tokenFile string, storagePath string, threads int) (storag
return nil, err
}
} else if !isDir {
return nil, fmt.Errorf("%s/%s is not a directory", storagePath+"/"+dir)
return nil, fmt.Errorf("%s is not a directory", storagePath+"/"+dir)
}
storage.idCache[dir] = dirID
}
Expand Down
2 changes: 1 addition & 1 deletion src/duplicacy_chunkuploader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func TestUploaderAndDownloader(t *testing.T) {
for i, chunk := range chunks {
downloaded := chunkDownloader.WaitForChunk(i)
if downloaded.GetID() != chunk.GetID() {
t.Error("Uploaded: %s, downloaded: %s", chunk.GetID(), downloaded.GetID())
t.Errorf("Uploaded: %s, downloaded: %s", chunk.GetID(), downloaded.GetID())
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/duplicacy_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ func TestStorage(t *testing.T) {
} else {
err = storage.DeleteFile(0, filePath)
if err != nil {
t.Errorf("Failed to delete file %s: %v", filePath)
t.Errorf("Failed to delete file %s: %v", filePath, err)
} else {
time.Sleep(time.Duration(delay) * time.Second)
filePath, exist, _, err = storage.FindChunk(0, chunks[1], true)
Expand Down
4 changes: 2 additions & 2 deletions src/duplicacy_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func TestRateLimit(t *testing.T) {
return
}
if int(n) != len(content) {
t.Errorf("Wrote %s bytes instead of %s", n, len(content))
t.Errorf("Wrote %d bytes instead of %d", n, len(content))
return
}

Expand All @@ -127,7 +127,7 @@ func TestRateLimit(t *testing.T) {
return
}
if int(n) != len(content) {
t.Errorf("Copied %s bytes instead of %s", n, len(content))
t.Errorf("Copied %d bytes instead of %d", n, len(content))
return
}

Expand Down

0 comments on commit f80a5b1

Please sign in to comment.