summaryrefslogtreecommitdiff
path: root/frontend/src/components/modals/filepicker/index.tsx
diff options
context:
space:
mode:
authorAAGaming <aa@mail.catvibers.me>2022-09-17 23:23:51 -0400
committerAAGaming <aa@mail.catvibers.me>2022-09-17 23:23:51 -0400
commitc4d6731401d3b6dc111a74d086df28704473070d (patch)
treeb8a1cff3ae32eac720300fd03093f9890ddf82cb /frontend/src/components/modals/filepicker/index.tsx
parentfded2fa8bfc52ae29848a343483c68f6955feb0c (diff)
downloaddecky-loader-c4d6731401d3b6dc111a74d086df28704473070d.tar.gz
decky-loader-c4d6731401d3b6dc111a74d086df28704473070d.zip
fix updater for new installs, fix file picker patch, fix scrolling on patch notes, fix tasks dir
Diffstat (limited to 'frontend/src/components/modals/filepicker/index.tsx')
-rw-r--r--frontend/src/components/modals/filepicker/index.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/frontend/src/components/modals/filepicker/index.tsx b/frontend/src/components/modals/filepicker/index.tsx
index 0847bd14..dcf179a3 100644
--- a/frontend/src/components/modals/filepicker/index.tsx
+++ b/frontend/src/components/modals/filepicker/index.tsx
@@ -86,7 +86,8 @@ const FilePicker: FunctionComponent<FilePickerProps> = ({
onClick={() => {
const newPathArr = path.split('/');
newPathArr.pop();
- const newPath = newPathArr.join('/');
+ let newPath = newPathArr.join('/');
+ if (newPath == '') newPath = '/';
setPath(newPath);
}}
>
@@ -113,7 +114,7 @@ const FilePicker: FunctionComponent<FilePickerProps> = ({
<DialogButton
style={{ borderRadius: 'unset', margin: '0', padding: '10px' }}
onClick={() => {
- const fullPath = `${path}/${file.name}`;
+ const fullPath = `${path}${path.endsWith('/') ? '' : '/'}${file.name}`;
if (file.isdir) setPath(fullPath);
else {
onSubmit({ path: fullPath, realpath: file.realpath });