From e901295f3c05e82f4c845a4eecb5d941f8f4883c Mon Sep 17 00:00:00 2001 From: ravenclaw900 <50060110+ravenclaw900@users.noreply.github.com> Date: Sat, 27 Nov 2021 18:18:15 -0600 Subject: [PATCH] fix(filebrowser): only set path if file can be opened --- src/frontend/src/pages/FileBrowser.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/pages/FileBrowser.svelte b/src/frontend/src/pages/FileBrowser.svelte index 4bc7fd89..f74d5825 100644 --- a/src/frontend/src/pages/FileBrowser.svelte +++ b/src/frontend/src/pages/FileBrowser.svelte @@ -205,19 +205,21 @@ switch (contents.maintype) { case "dir": sendCmd(contents.path, "cd"); + currentPath = contents.path; break; case "text": sendCmd(contents.path, "open"); + currentPath = contents.path; break; case "image": sendCmd(contents.path, "img"); + currentPath = contents.path; break; default: alert( "ERROR: can't view that type of file" ); } - currentPath = contents.path; }} on:click={() => (selPath = contents)} >