@@ -546,11 +546,10 @@ function pkgmgr.install_dir(type, path, basename, targetpath)
546546 local from = basefolder and basefolder .path or path
547547 if targetpath then
548548 core .delete_dir (targetpath )
549- core .create_dir (targetpath )
550549 else
551550 targetpath = core .get_texturepath () .. DIR_DELIM .. basename
552551 end
553- if not core .copy_dir (from , targetpath ) then
552+ if not core .copy_dir (from , targetpath , false ) then
554553 return nil ,
555554 fgettext (" Failed to install $1 to $2" , basename , targetpath )
556555 end
@@ -571,7 +570,6 @@ function pkgmgr.install_dir(type, path, basename, targetpath)
571570 -- Get destination name for modpack
572571 if targetpath then
573572 core .delete_dir (targetpath )
574- core .create_dir (targetpath )
575573 else
576574 local clean_path = nil
577575 if basename ~= nil then
@@ -595,7 +593,6 @@ function pkgmgr.install_dir(type, path, basename, targetpath)
595593
596594 if targetpath then
597595 core .delete_dir (targetpath )
598- core .create_dir (targetpath )
599596 else
600597 local targetfolder = basename
601598 if targetfolder == nil then
@@ -621,14 +618,13 @@ function pkgmgr.install_dir(type, path, basename, targetpath)
621618
622619 if targetpath then
623620 core .delete_dir (targetpath )
624- core .create_dir (targetpath )
625621 else
626622 targetpath = core .get_gamepath () .. DIR_DELIM .. basename
627623 end
628624 end
629625
630626 -- Copy it
631- if not core .copy_dir (basefolder .path , targetpath ) then
627+ if not core .copy_dir (basefolder .path , targetpath , false ) then
632628 return nil ,
633629 fgettext (" Failed to install $1 to $2" , basename , targetpath )
634630 end
0 commit comments