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:
Abhishek S Lal
2026-03-24 19:19:29 +05:30
committed by GitHub
parent 650ad0fe60
commit 590a5a968d

View File

@@ -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}`);