From 9b83cd7b84e237a0a9bf258dcda2c9f7d1a7905d Mon Sep 17 00:00:00 2001 From: Pragadesh-45 Date: Mon, 16 Dec 2024 12:01:42 +0530 Subject: [PATCH] fix: update condition for renaming items in Windows OS --- 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 d1ff7c3f9..c1ad96900 100644 --- a/packages/bruno-electron/src/ipc/collection.js +++ b/packages/bruno-electron/src/ipc/collection.js @@ -350,7 +350,7 @@ const registerRendererEventHandlers = (mainWindow, watcher, lastOpenedCollection ipcMain.handle('renderer:rename-item', async (event, oldPath, newPath, newName) => { const tempDir = path.join(os.tmpdir(), `temp-folder-${Date.now()}`); const parentDir = path.dirname(oldPath); - const isWindowsOSAndNotWSLAndItemHasSubDirectories = isWindowsOS() && !isWSLPath(oldPath) && hasSubDirectories(oldPath); + const isWindowsOSAndNotWSLAndItemHasSubDirectories = isDirectory(oldPath) && isWindowsOS() && !isWSLPath(oldPath) && hasSubDirectories(oldPath); let parentDirUnwatched = false; let parentDirRewatched = false;