From 897a5e26481fbfe074ddb5895de61795eaa6ede3 Mon Sep 17 00:00:00 2001 From: SpikeHD <25207995+SpikeHD@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:21:28 -0700 Subject: [PATCH] fix: loading from dir --- src-tauri/src/functionality/extension.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src-tauri/src/functionality/extension.rs b/src-tauri/src/functionality/extension.rs index 14fc14ea..ad85034a 100644 --- a/src-tauri/src/functionality/extension.rs +++ b/src-tauri/src/functionality/extension.rs @@ -77,12 +77,11 @@ pub fn load_extensions(win: &WebviewWindow) { for file in files.flatten() { let path = file.path(); - if path.is_file() { - let path = path.to_str().unwrap_or_default(); - let path = PathBuf::from(path); + // Path can be file or folder, doesn't matter + let path = path.to_str().unwrap_or_default(); + let path = PathBuf::from(path); - add_extension(win, path); - } + add_extension(win, path); } }