diff --git a/packages/core/src/utils/getFolderStructure.ts b/packages/core/src/utils/getFolderStructure.ts index 5a2f99d729..5e7adc9d5b 100644 --- a/packages/core/src/utils/getFolderStructure.ts +++ b/packages/core/src/utils/getFolderStructure.ts @@ -113,7 +113,9 @@ 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}`, @@ -121,7 +123,7 @@ async function readFullStructure( 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;