Browse Source

fix(bundler): deadlock on `ResourcePaths` iterator, closes #3146 (#3152)

Lucas Fernandes Nogueira 3 years ago
parent
commit
4c1be45106
2 changed files with 6 additions and 0 deletions
  1. 5 0
      .changes/fix-deadlock-path-iter.md
  2. 1 0
      tooling/bundler/src/bundle/settings.rs

+ 5 - 0
.changes/fix-deadlock-path-iter.md

@@ -0,0 +1,5 @@
+---
+"tauri-bundler": patch
+---
+
+Fixes a deadlock on the `ResourcePaths` iterator.

+ 1 - 0
tooling/bundler/src/bundle/settings.rs

@@ -795,6 +795,7 @@ impl<'a> Iterator for ResourcePaths<'a> {
           return Some(Ok(path));
         } else if let Some(current_path) = &self.current_pattern {
           if !self.current_pattern_is_valid {
+            self.glob_iter = None;
             return Some(Err(crate::Error::GenericError(format!(
               "Path matching '{}' not found",
               current_path