From 8b5d56fe27b430f0cf71d7d152cacdf5afce66e8 Mon Sep 17 00:00:00 2001 From: Alula <6276139+alula@users.noreply.github.com> Date: Sat, 16 Oct 2021 04:45:23 +0200 Subject: [PATCH] slight optimization for vfs lookups --- src/framework/vfs.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/framework/vfs.rs b/src/framework/vfs.rs index 7dfd225..c074357 100644 --- a/src/framework/vfs.rs +++ b/src/framework/vfs.rs @@ -238,6 +238,12 @@ impl PhysicalFS { .collect(); 'citer: for node in components { + let mut tmp = root_path2.clone(); + tmp.push(node); + if tmp.exists() { + root_path2 = tmp; + continue; + } if let Ok(entries) = root_path2.read_dir() { for entry in entries {