alroyso 1 năm trước cách đây
mục cha
commit
4a7df5ff55
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      scripts/init.dart

+ 3 - 3
scripts/init.dart

@@ -25,7 +25,7 @@ Future downloadLatestClashCore() async {
       .firstWhere((it) => (it['name'] as String).contains(clashCoreName));
   final String downloadUrl = latest['browser_download_url'];
 
-  final String newName = 'clash-${ClashName.platform}-${ClashName.arch}';
+  //final String newName = 'clash-${ClashName.platform}-${ClashName.arch}';
   final String name = clashCoreName;
   final tempFile = File(path.join(binDir.path, '$name.temp'));
 
@@ -37,12 +37,12 @@ Future downloadLatestClashCore() async {
   final tempBetys = await tempFile.readAsBytes();
   if (name.contains('.gz')) {
     final bytes = GZipDecoder().decodeBytes(tempBetys);
-    final String filePath = path.join(binDir.path, newName);
+    final String filePath = path.join(binDir.path, ClashName.name);
     await File(filePath).writeAsBytes(bytes);
     await Process.run('chmod', ['+x', filePath]);
   } else {
     final file = ZipDecoder().decodeBytes(tempBetys).first;
-    await File(path.join(binDir.path, newName)).writeAsBytes(file.content);
+    await File(path.join(binDir.path, ClashName.name)).writeAsBytes(file.content);
   }
   await tempFile.delete();
   print('Unarchiv Success');