Skip to content

Commit bfb34c6

Browse files
committed
Merge branch 'master' of github.com:Piero512/rutorrent-flutter
2 parents 8bfae14 + ff86e39 commit bfb34c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/pages/downloads_page.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ class _DownloadsPageState extends State<DownloadsPage> {
2222
}
2323

2424
_initFiles() async {
25-
_homeDirectory = (await getExternalStorageDirectory()).path + '/';
25+
if (Platform.isAndroid) {
26+
_homeDirectory = (await getExternalStorageDirectory()).path + '/';
27+
} else {
28+
_homeDirectory = (await getApplicationDocumentsDirectory()).path + '/';
29+
}
2630
_directory = _homeDirectory;
2731
_syncFiles();
2832
}

0 commit comments

Comments
 (0)