瀏覽代碼

fix fileuri error on android

Laserlicht 10 月之前
父節點
當前提交
7cc5c06d2a
共有 1 個文件被更改,包括 8 次插入5 次删除
  1. 8 5
      launcher/modManager/chroniclesextractor.cpp

+ 8 - 5
launcher/modManager/chroniclesextractor.cpp

@@ -235,16 +235,19 @@ void ChroniclesExtractor::installChronicles(QStringList exe)
 	for(QString f : exe)
 	{
 		extractionFile++;
-		QFile file(f);
 
-		int chronicleNo = getChronicleNo(file);
-		if(!chronicleNo)
+		if(!createTempDir())
 			continue;
+		
+		QString filepath = tempDir.filePath("chr.exe");
+		QFile(f).copy(filepath);
+		QFile file(filepath);
 
-		if(!createTempDir())
+		int chronicleNo = getChronicleNo(file);
+		if(!chronicleNo)
 			continue;
 
-		if(!extractGogInstaller(f))
+		if(!extractGogInstaller(filepath))
 			continue;
 		
 		createBaseMod();