Преглед изворни кода

Remove .github folder after mod setup

George King пре 5 месеци
родитељ
комит
70742a69de
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      launcher/modManager/modstatecontroller.cpp

+ 5 - 0
launcher/modManager/modstatecontroller.cpp

@@ -232,6 +232,11 @@ bool ModStateController::doInstallMod(QString modname, QString archivePath)
 	auto rc = QFile::rename(destDir + modDirName, destDir + modname);
 	if (rc)
 		extractedDir.setPath(destDir + modname);
+
+	// Remove .github folder from installed mod
+	QDir githubDir(extractedDir.filePath(".github"));
+	if (githubDir.exists())
+	    githubDir.removeRecursively();
 	
 	//there are possible excessive files - remove them
 	QString upperLevel = modDirName.section('/', 0, 0);