From 4a0376ec2b922897f5c80e64a0e7268aa3980503 Mon Sep 17 00:00:00 2001 From: Alexander Kucera Date: Tue, 4 Nov 2025 11:16:25 +0100 Subject: [PATCH] Simplifies path handling for temp directories Removes unnecessary conditional logic when constructing paths for temporary directories. The logic previously checked if the plugin directory was absolute before joining it with the directory name. This check is redundant as `path.join` correctly handles both absolute and relative paths. --- src/core/TempDirectoryManager.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/TempDirectoryManager.ts b/src/core/TempDirectoryManager.ts index 4efc75e..0279e6e 100644 --- a/src/core/TempDirectoryManager.ts +++ b/src/core/TempDirectoryManager.ts @@ -49,9 +49,7 @@ export class TempDirectoryManager { const pluginDir = this.getPluginDir(); // Use path.join to properly handle absolute paths - const result = path.isAbsolute(pluginDir) - ? path.join(pluginDir, dirName) - : path.join(pluginDir, dirName); + const result = path.join(pluginDir, dirName); return normalizePath(path.normalize(result)); }