mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-06 21:54:38 -06:00
Merge branch 'master' into dry_run
This commit is contained in:
@@ -1022,12 +1022,17 @@ func copySnapshots(context *cli.Context) {
|
||||
os.Exit(ArgumentExitCode)
|
||||
}
|
||||
|
||||
threads := context.Int("threads")
|
||||
if threads < 1 {
|
||||
threads = 1
|
||||
}
|
||||
|
||||
repository, source := getRepositoryPreference(context, context.String("from"))
|
||||
|
||||
runScript(context, source.Name, "pre")
|
||||
|
||||
duplicacy.LOG_INFO("STORAGE_SET", "Source storage set to %s", source.StorageURL)
|
||||
sourceStorage := duplicacy.CreateStorage(*source, false, 1)
|
||||
sourceStorage := duplicacy.CreateStorage(*source, false, threads)
|
||||
if sourceStorage == nil {
|
||||
return
|
||||
}
|
||||
@@ -1057,7 +1062,7 @@ func copySnapshots(context *cli.Context) {
|
||||
|
||||
|
||||
duplicacy.LOG_INFO("STORAGE_SET", "Destination storage set to %s", destination.StorageURL)
|
||||
destinationStorage := duplicacy.CreateStorage(*destination, false, 1)
|
||||
destinationStorage := duplicacy.CreateStorage(*destination, false, threads)
|
||||
if destinationStorage == nil {
|
||||
return
|
||||
}
|
||||
@@ -1082,11 +1087,6 @@ func copySnapshots(context *cli.Context) {
|
||||
snapshotID = context.String("id")
|
||||
}
|
||||
|
||||
threads := context.Int("threads")
|
||||
if threads < 1 {
|
||||
threads = 1
|
||||
}
|
||||
|
||||
sourceManager.CopySnapshots(destinationManager, snapshotID, revisions, threads)
|
||||
runScript(context, source.Name, "post")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user