Fix AddProjectModal to use isDirectory property for directory checks
Updated the directory check in AddProjectModal to use the isDirectory property instead of type for better clarity and consistency in identifying the '.auto-claude' folder. This change enhances the reliability of the existing functionality that checks for the presence of the specified directory.
This commit is contained in:
@@ -103,7 +103,7 @@ export function AddProjectModal({ open, onOpenChange, onProjectAdded }: AddProje
|
||||
const listResult = await window.electronAPI.listDirectory(path);
|
||||
if (listResult.success && listResult.data) {
|
||||
const hasAutoClaudeFolder = listResult.data.some(
|
||||
(item) => item.name === '.auto-claude' && item.type === 'directory'
|
||||
(item) => item.name === '.auto-claude' && item.isDirectory
|
||||
);
|
||||
setExistingHasAutoClaude(hasAutoClaudeFolder);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user