1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-20 10:13:20 +00:00

Fixed format argument errors

This commit is contained in:
Gilbert Chen
2018-05-24 11:37:52 -04:00
parent aadd2aa390
commit f80a5b1025
4 changed files with 5 additions and 5 deletions

View File

@@ -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
}

View File

@@ -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())
}
}

View File

@@ -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)

View File

@@ -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
}