From 07f89e5240d5d1c09383442c524c253526e7a20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Blanquer=E2=80=8B?= Date: Wed, 21 Jan 2026 15:07:18 +0100 Subject: [PATCH] fix: folder browser navigation issues - Show parent directory (..) button even when folder has no subfolders - Handle Windows backslash paths when calculating parent directory - Prevent navigation to Windows drive root (C:\) from breaking --- src/components/ProjectCreationWizard.jsx | 66 ++++++++++++++---------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/src/components/ProjectCreationWizard.jsx b/src/components/ProjectCreationWizard.jsx index 25c5ed8..ed40e60 100644 --- a/src/components/ProjectCreationWizard.jsx +++ b/src/components/ProjectCreationWizard.jsx @@ -654,17 +654,21 @@ const ProjectCreationWizard = ({ onClose, onProjectCreated }) => {
- ) : browserFolders.length === 0 ? ( -
- No folders found -
) : (
- {/* Parent Directory */} - {browserCurrentPath !== '~' && browserCurrentPath !== '/' && ( + {/* Parent Directory - check for Windows root (e.g., C:\) and Unix root */} + {browserCurrentPath !== '~' && browserCurrentPath !== '/' && !/^[A-Za-z]:\\?$/.test(browserCurrentPath) && ( - + {browserFolders.length === 0 ? ( +
+ No subfolders found
- ))} + ) : ( + browserFolders + .filter(folder => showHiddenFolders || !folder.name.startsWith('.')) + .sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())) + .map((folder, index) => ( +
+ + +
+ )) + )}
)}