mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 07:43:42 +08:00
fix: LocalizationUIModel savePath.create
This commit is contained in:
parent
6f146ed84b
commit
5eb0c6dda8
@ -280,6 +280,7 @@ class LocalizationUIModel extends _$LocalizationUIModel {
|
|||||||
"${URLConf.gitlabLocalizationUrl}/archive/${value.versionName}.tar.gz";
|
"${URLConf.gitlabLocalizationUrl}/archive/${value.versionName}.tar.gz";
|
||||||
final r = await RSHttp.get(downloadUrl);
|
final r = await RSHttp.get(downloadUrl);
|
||||||
if (r.statusCode == 200 && r.data != null) {
|
if (r.statusCode == 200 && r.data != null) {
|
||||||
|
await savePath.create(recursive: true);
|
||||||
await savePath.writeAsBytes(r.data!, flush: true);
|
await savePath.writeAsBytes(r.data!, flush: true);
|
||||||
} else {
|
} else {
|
||||||
throw "statusCode Error : ${r.statusCode}";
|
throw "statusCode Error : ${r.statusCode}";
|
||||||
|
Loading…
Reference in New Issue
Block a user