Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/core/src/utils/getFolderStructure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,17 @@ async function readFullStructure(
} catch (error: unknown) {
if (
isNodeError(error) &&
(error.code === 'EACCES' || error.code === 'ENOENT')
(error.code === 'EACCES' ||
error.code === 'ENOENT' ||
error.code === 'EPERM')
) {
debugLogger.warn(
`Warning: Could not read directory ${currentPath}: ${error.message}`,
);
if (currentPath === rootPath && error.code === 'ENOENT') {
return null; // Root directory itself not found
}
// For other EACCES/ENOENT on subdirectories, just skip them.
// For other EACCES/ENOENT/EPERM on subdirectories, just skip them.
continue;
}
throw error;
Expand Down
Loading