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

@@ -22,6 +22,14 @@ func GetPackwizLocalStore() (string, error) {
return filepath.Join(userConfigDir, "packwiz"), nil
}
func GetPackwizLocalCache() (string, error) {
userCacheDir, err := os.UserCacheDir()
if err != nil {
return "", err
}
return filepath.Join(userCacheDir, "packwiz"), nil
}
func GetPackwizInstallBinPath() (string, error) {
localStore, err := GetPackwizLocalStore()
if err != nil {
@@ -46,7 +54,7 @@ func GetPackwizInstallBinFile() (string, error) {
}
func GetPackwizCache() (string, error) {
localStore, err := GetPackwizLocalStore()
localStore, err := GetPackwizLocalCache()
if err != nil {
return "", err
}