2
0
Эх сурвалжийг харах

fix fileuri error on android

Laserlicht 10 сар өмнө
parent
commit
7cc5c06d2a

+ 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();