Completed download implementation for CF export

Added support for importing manual files and rehashing where necessary
Moved cache folder to "local" user folder
Cleaned up messages, saved index after importing
This commit is contained in:
comp500
2022-05-21 03:40:00 +01:00
parent 55f0e4a297
commit f3837af145
4 changed files with 214 additions and 36 deletions

View File

@@ -20,13 +20,9 @@ func ListManualDownloads(session core.DownloadSession) {
fmt.Printf("Error locating cache folder: %v", err)
os.Exit(1)
}
err = os.MkdirAll(filepath.Join(cacheDir, core.DownloadCacheInFolder), 0755)
if err != nil {
fmt.Printf("Error creating cache in folder: %v", err)
os.Exit(1)
}
fmt.Printf("Once you have done so, place these files in %s and re-run this command.\n",
filepath.Join(cacheDir, core.DownloadCacheInFolder))
filepath.Join(cacheDir, core.DownloadCacheImportFolder))
os.Exit(1)
}
}