restore: support sparse restores also on windows

This commit is contained in:
Michael Eischer
2022-09-04 11:23:31 +02:00
parent 0f89f443c7
commit 19afad8a09
8 changed files with 129 additions and 63 deletions
+1 -4
View File
@@ -1,7 +1,6 @@
package main
import (
"runtime"
"strings"
"time"
@@ -60,9 +59,7 @@ func init() {
flags.StringVarP(&restoreOptions.Target, "target", "t", "", "directory to extract data to")
initSingleSnapshotFilterOptions(flags, &restoreOptions.snapshotFilterOptions)
if runtime.GOOS != "windows" {
flags.BoolVar(&restoreOptions.Sparse, "sparse", false, "restore files as sparse (not supported on windows)")
}
flags.BoolVar(&restoreOptions.Sparse, "sparse", false, "restore files as sparse")
flags.BoolVar(&restoreOptions.Verify, "verify", false, "verify restored files content")
}