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:
@@ -55,7 +55,7 @@ func CreateACDStorage(tokenFile string, storagePath string, threads int) (storag
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
} else if !isDir {
|
} 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
|
storage.idCache[dir] = dirID
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ func TestUploaderAndDownloader(t *testing.T) {
|
|||||||
for i, chunk := range chunks {
|
for i, chunk := range chunks {
|
||||||
downloaded := chunkDownloader.WaitForChunk(i)
|
downloaded := chunkDownloader.WaitForChunk(i)
|
||||||
if downloaded.GetID() != chunk.GetID() {
|
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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ func TestStorage(t *testing.T) {
|
|||||||
} else {
|
} else {
|
||||||
err = storage.DeleteFile(0, filePath)
|
err = storage.DeleteFile(0, filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Failed to delete file %s: %v", filePath)
|
t.Errorf("Failed to delete file %s: %v", filePath, err)
|
||||||
} else {
|
} else {
|
||||||
time.Sleep(time.Duration(delay) * time.Second)
|
time.Sleep(time.Duration(delay) * time.Second)
|
||||||
filePath, exist, _, err = storage.FindChunk(0, chunks[1], true)
|
filePath, exist, _, err = storage.FindChunk(0, chunks[1], true)
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ func TestRateLimit(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if int(n) != len(content) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ func TestRateLimit(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if int(n) != len(content) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user