Bugfix + changed apps JSON folder name

This commit is contained in:
Imran Remtulla
2022-08-23 15:13:05 -04:00
parent b55fcafd95
commit 9354e3c30b

View File

@@ -72,7 +72,7 @@ class AppsProvider with ChangeNotifier {
StreamedResponse response = StreamedResponse response =
await Client().send(Request('GET', Uri.parse(apps[appId]!.app.apkUrl))); await Client().send(Request('GET', Uri.parse(apps[appId]!.app.apkUrl)));
File downloadFile = File downloadFile =
File('${(await getExternalStorageDirectory())!.path}/apks/$appId.apk'); File('${(await getExternalStorageDirectory())!.path}/$appId.apk');
if (downloadFile.existsSync()) { if (downloadFile.existsSync()) {
downloadFile.deleteSync(); downloadFile.deleteSync();
} }
@@ -108,7 +108,7 @@ class AppsProvider with ChangeNotifier {
Future<Directory> getAppsDir() async { Future<Directory> getAppsDir() async {
Directory appsDir = Directory( Directory appsDir = Directory(
'${(await getExternalStorageDirectory())?.path as String}/apps'); '${(await getExternalStorageDirectory())?.path as String}/app_data');
if (!appsDir.existsSync()) { if (!appsDir.existsSync()) {
appsDir.createSync(); appsDir.createSync();
} }