diff --git a/src/duplicacy_acdstorage.go b/src/duplicacy_acdstorage.go index ecbd092..e525373 100644 --- a/src/duplicacy_acdstorage.go +++ b/src/duplicacy_acdstorage.go @@ -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 } diff --git a/src/duplicacy_chunkuploader_test.go b/src/duplicacy_chunkuploader_test.go index 9becd29..f8312ec 100644 --- a/src/duplicacy_chunkuploader_test.go +++ b/src/duplicacy_chunkuploader_test.go @@ -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()) } } diff --git a/src/duplicacy_storage_test.go b/src/duplicacy_storage_test.go index c0fdf40..01c333a 100644 --- a/src/duplicacy_storage_test.go +++ b/src/duplicacy_storage_test.go @@ -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) diff --git a/src/duplicacy_utils_test.go b/src/duplicacy_utils_test.go index 61a833a..82d508b 100644 --- a/src/duplicacy_utils_test.go +++ b/src/duplicacy_utils_test.go @@ -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 } @@ -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 }