Skip to content

Commit

Permalink
Fix #173
Browse files Browse the repository at this point in the history
  • Loading branch information
Hentioe committed May 20, 2020
1 parent 8b9eaa7 commit aecd3ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/src/widget/updates_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ class _UpdatesSheetState extends State<UpdatesSheet> {
}

void _scheduleDownloadTask(String url) async {
var tempDir = (await getExternalCacheDirectories()).first.path;
var file = File('$tempDir/${widget.releases.first.tagName}.apk');
var tempDir = (await getExternalStorageDirectory()).path;
var updatesPath = '$tempDir/updates';
var updatesDir = Directory(updatesPath);
if (!(await updatesDir.exists())) await updatesDir.create();
var file = File(
'$updatesPath/${widget.releases.first.tagName}_${widget.releases.first.assets.first.id}.apk');

if (!await file.exists()) {
_initProgressDialogWithShow();
Expand Down

0 comments on commit aecd3ec

Please sign in to comment.