add skip download

This commit is contained in:
2025-07-20 21:13:07 -07:00
parent 54cc1d9a55
commit 6b6dbdda99
2 changed files with 28 additions and 26 deletions

View File

@ -49,7 +49,7 @@ func main() {
log.Fatalf("WowDir in %s is still the default setting, exiting", cfgPath)
}
stats, err := epoch.DownloadUpdate(config.WowDir, forceFlag, config.RemoveUnknownPatches)
stats, err := epoch.Update(config.WowDir, forceFlag, config.RemoveUnknownPatches, false)
if err != nil {
log.Fatal(err)
}

View File

@ -19,7 +19,7 @@ type DownloadStats struct {
Current int
}
func DownloadUpdate(wowdir string, force bool, removeUnknown bool) (DownloadStats, error) {
func Update(wowdir string, force bool, removeUnknown bool, skipDownload bool) (DownloadStats, error) {
var stats DownloadStats
manifest, err := GetManifest()
@ -56,6 +56,7 @@ func DownloadUpdate(wowdir string, force bool, removeUnknown bool) (DownloadStat
}
}
if !skipDownload {
fmt.Printf("Updating %s...\n", localPath)
outFile, err := os.Create(localPath)
@ -87,6 +88,7 @@ func DownloadUpdate(wowdir string, force bool, removeUnknown bool) (DownloadStat
outFile.Close()
stats.Updated += 1
}
}
if removeUnknown {
patches := make([]string, 0)