@@ -223,11 +223,13 @@ class Home {
223223 let infoStarting = document . querySelector ( ".info-starting-game-text" )
224224 let progressBar = document . querySelector ( '.progress-bar' )
225225
226+ let rootPath = `${ await appdata ( ) } /${ process . platform == 'darwin' ? this . config . dataDirectory : `.${ this . config . dataDirectory } ` } `
227+
226228 let opt = {
227229 url : options . url ,
228230 authenticator : authenticator ,
229231 timeout : 10000 ,
230- path : ` ${ await appdata ( ) } / ${ process . platform == 'darwin' ? this . config . dataDirectory : `. ${ this . config . dataDirectory } ` } ` ,
232+ path : rootPath ,
231233 instance : options . name ,
232234 version : options . loadder . minecraft_version ,
233235 detached : configClient . launcher_config . closeLauncher == "close-all" ? false : true ,
@@ -246,7 +248,7 @@ class Home {
246248 // Logique "Smart Ignore" :
247249 // 1. Si le fichier existe localement -> On le garde dans ignored (donc pas de verif/overwrite)
248250 // 2. Si le fichier n'existe PAS -> On le retire de ignored (donc il sera verifié -> manquant -> téléchargé)
249- let filePath = path . join ( opt . path , file ) ;
251+ let filePath = path . join ( rootPath , file ) ;
250252 return fs . existsSync ( filePath ) ;
251253 } ) ,
252254
@@ -397,20 +399,20 @@ class Home {
397399 fs . mkdirSync ( instancesDir ) ;
398400 let popupSuccess = new popup ( ) ;
399401 popupSuccess . openPopup ( {
400- title : 'Succès' ,
401- content : 'Le modpack a été supprimé avec succès.' ,
402- color : 'green' ,
403- options : [
404- { name : 'OK' , func : ( ) => { location . reload ( ) ; } }
405- ]
402+ title : 'Succès' ,
403+ content : 'Le modpack a été supprimé avec succès.' ,
404+ color : 'green' ,
405+ options : [
406+ { name : 'OK' , func : ( ) => { location . reload ( ) ; } }
407+ ]
406408 } ) ;
407409 } catch ( e ) {
408410 console . error ( 'Failed to delete instances:' , e ) ;
409411 let popupError = new popup ( ) ;
410412 popupError . openPopup ( {
411- title : 'Erreur' ,
412- content : 'Une erreur est survenue lors de la suppression.' ,
413- color : 'red'
413+ title : 'Erreur' ,
414+ content : 'Une erreur est survenue lors de la suppression.' ,
415+ color : 'red'
414416 } ) ;
415417 }
416418 }
0 commit comments