fix: LocalizationUIModel savePath.create

This commit is contained in:
xkeyC 2024-05-08 12:21:43 +08:00
parent 6f146ed84b
commit 5eb0c6dda8

View File

@ -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}";