Pārlūkot izejas kodu

fix(bundler): fix error when renaming the downloaded zip of NSIS (#9956)

Pylogmon 1 gadu atpakaļ
vecāks
revīzija
8b66174f0d
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      tooling/bundler/src/bundle/windows/nsis.rs

+ 4 - 1
tooling/bundler/src/bundle/windows/nsis.rs

@@ -68,10 +68,13 @@ pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result<Vec<P
     .map(|d| d.join(".tauri"))
     .unwrap_or_else(|| dirs_next::cache_dir().unwrap().join("tauri"));
 
+  if !tauri_tools_path.exists() {
+    create_dir_all(&tauri_tools_path)?;
+  }
+
   let nsis_toolset_path = tauri_tools_path.join("NSIS");
 
   if !nsis_toolset_path.exists() {
-    create_dir_all(&nsis_toolset_path)?;
     get_and_extract_nsis(&nsis_toolset_path, &tauri_tools_path)?;
   } else if NSIS_REQUIRED_FILES
     .iter()