mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	Update mod loader install logic
This commit is contained in:
		
							parent
							
								
									f9dbd884b3
								
							
						
					
					
						commit
						2dec7c21dc
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -336,12 +336,14 @@ export var modInstallState: string; | |||
| export async function installModLoader() { | ||||
|     if ((await getConfig("mods")) == "none") { | ||||
|         modInstallState = "none"; | ||||
|         fs.rmSync(app.getPath("userData") + "/plugins/loader", {recursive: true, force: true}); | ||||
|         import("./extensions/plugin"); | ||||
|         console.log("[Mod loader] Skipping"); | ||||
|     } else { | ||||
|         const pluginFolder = app.getPath("userData") + "/plugins/"; | ||||
|         if (!fs.existsSync(pluginFolder + "loader")) { | ||||
|         if (!fs.existsSync(pluginFolder + "loader") || !fs.existsSync(pluginFolder + "loader/dist/" + "bundle.css")) { | ||||
|             try { | ||||
|                 fs.rmSync(app.getPath("userData") + "/plugins/loader", {recursive: true, force: true}); | ||||
|                 modInstallState = "installing"; | ||||
|                 var zipPath = app.getPath("temp") + "/" + "loader.zip"; | ||||
|                 if (!fs.existsSync(pluginFolder)) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue