mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
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.
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user