From 590a5a968de600534f79de50ca53c59006cbe912 Mon Sep 17 00:00:00 2001 From: Abhishek S Lal Date: Tue, 24 Mar 2026 19:19:29 +0530 Subject: [PATCH] fix(import): handle EEXIST when importing OpenAPI collections with paths grouping (#7499) Use { recursive: true } in mkdirSync during collection import so that directories which already exist (e.g. due to duplicate or case-colliding path params like {customerID} vs {customerId}) do not throw EEXIST and abort the import. --- packages/bruno-electron/src/ipc/collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-electron/src/ipc/collection.js b/packages/bruno-electron/src/ipc/collection.js index b195d3582..323541dcc 100644 --- a/packages/bruno-electron/src/ipc/collection.js +++ b/packages/bruno-electron/src/ipc/collection.js @@ -1172,7 +1172,7 @@ const registerRendererEventHandlers = (mainWindow, watcher) => { if (item.type === 'folder') { let sanitizedFolderName = sanitizeName(item?.filename || item?.name); const folderPath = path.join(currentPath, sanitizedFolderName); - fs.mkdirSync(folderPath); + fs.mkdirSync(folderPath, { recursive: true }); if (item?.root?.meta?.name) { const folderFilePath = path.join(folderPath, `folder.${format}`);