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.
This commit is contained in:
1 file changed
+1
-3
@@ -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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user