diff --git a/src/core/TempDirectoryManager.ts b/src/core/TempDirectoryManager.ts index f782ec9..b2b86ed 100644 --- a/src/core/TempDirectoryManager.ts +++ b/src/core/TempDirectoryManager.ts @@ -446,7 +446,13 @@ export class TempDirectoryManager { const tempImagesDir = normalizePath(path.join(pluginDir, PLUGIN_DIRS.TEMP_IMAGES)); const tempPandocDir = normalizePath(path.join(pluginDir, PLUGIN_DIRS.TEMP_PANDOC)); - return normalizedDirPath.startsWith(tempImagesDir) || - normalizedDirPath.startsWith(tempPandocDir); + const isImagesDir = + normalizedDirPath === tempImagesDir || + normalizedDirPath.startsWith(`${tempImagesDir}/`); + const isPandocDir = + normalizedDirPath === tempPandocDir || + normalizedDirPath.startsWith(`${tempPandocDir}/`); + + return isImagesDir || isPandocDir; } } \ No newline at end of file