mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-06 00:03:38 +00:00
Compare commits
6 Commits
0d0ee54547
...
8298036dbd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8298036dbd | ||
|
|
bb214b6e04 | ||
|
|
6bca9fccdd | ||
|
|
a06d925e53 | ||
|
|
4056618204 | ||
|
|
ee344a0abe |
@@ -2263,7 +2263,7 @@ func main() {
|
||||
app.Name = "duplicacy"
|
||||
app.HelpName = "duplicacy"
|
||||
app.Usage = "A new generation cloud backup tool based on lock-free deduplication"
|
||||
app.Version = "3.2.3" + " (" + GitCommit + ")"
|
||||
app.Version = "3.2.4" + " (" + GitCommit + ")"
|
||||
|
||||
// Exit with code 2 if an invalid command is provided
|
||||
app.CommandNotFound = func(context *cli.Context, command string) {
|
||||
|
||||
@@ -559,7 +559,7 @@ func loadIncompleteSnapshot(snapshotID string, cachePath string) *EntryList {
|
||||
// Delete the two incomplete files.
|
||||
func deleteIncompleteSnapshot(cachePath string) {
|
||||
|
||||
for _, file := range []string{"incomplete_snapshot", "incomplete_chunks"} {
|
||||
for _, file := range []string{"incomplete_snapshot", "incomplete_chunks", "incomplete_files"} {
|
||||
filePath := path.Join(cachePath, file)
|
||||
if _, err := os.Stat(filePath); err == nil {
|
||||
err = os.Remove(filePath)
|
||||
|
||||
@@ -201,7 +201,12 @@ func (client *OneDriveClient) call(url string, method string, input interface{},
|
||||
continue
|
||||
} else if response.StatusCode == 409 {
|
||||
return nil, 0, OneDriveError{Status: response.StatusCode, Message: "Conflict"}
|
||||
} else if response.StatusCode > 401 && response.StatusCode != 404 {
|
||||
} else if response.StatusCode >= 400 && response.StatusCode != 404 && !(
|
||||
method == "PATCH" && response.StatusCode == 400) {
|
||||
// MoveFile uses PATCH method, and it unfortunately relies on
|
||||
// processing 400 errors for detecting non-existent target
|
||||
// folders. So in this case we bubble up 400 errors to be handled
|
||||
// in MoveFile
|
||||
delay := int((rand.Float32() * 0.5 + 0.5) * 1000.0 * float32(backoff))
|
||||
if backoffList, found := response.Header["Retry-After"]; found && len(backoffList) > 0 {
|
||||
retryAfter, _ := strconv.Atoi(backoffList[0])
|
||||
|
||||
@@ -2006,10 +2006,6 @@ func (manager *SnapshotManager) PruneSnapshots(selfID string, snapshotID string,
|
||||
// deletable.
|
||||
for _, collectionName := range collections {
|
||||
|
||||
if collectOnly {
|
||||
continue
|
||||
}
|
||||
|
||||
matched := collectionRegex.FindStringSubmatch(collectionName)
|
||||
if matched == nil {
|
||||
continue
|
||||
@@ -2020,6 +2016,10 @@ func (manager *SnapshotManager) PruneSnapshots(selfID string, snapshotID string,
|
||||
maxCollectionNumber = collectionNumber
|
||||
}
|
||||
|
||||
if collectOnly {
|
||||
continue
|
||||
}
|
||||
|
||||
collectionFile := path.Join(collectionDir, collectionName)
|
||||
manager.fileChunk.Reset(false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user