From 3f138f0b4b178c4d60778b95bd571934069e17a0 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Thu, 25 Sep 2025 16:50:36 +0200 Subject: [PATCH] fix(FileDiscovery): Use PathUtils.getVaultPath() instead of adapter.basePath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes TypeScript error by using the existing PathUtils.getVaultPath() method which safely accesses FileSystemAdapter.getBasePath() with proper error handling. The adapter.basePath property doesn't exist on DataAdapter interface. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/converters/pdf/FileDiscovery.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/converters/pdf/FileDiscovery.ts b/src/converters/pdf/FileDiscovery.ts index 11edd11..c639f1d 100644 --- a/src/converters/pdf/FileDiscovery.ts +++ b/src/converters/pdf/FileDiscovery.ts @@ -84,7 +84,13 @@ export class FileDiscovery { const pathUtils = new PathUtils(plugin.app); // Check if outputDir is inside the vault - const vaultPath = plugin.app.vault.adapter.basePath || ''; + let vaultPath = ''; + try { + vaultPath = pathUtils.getVaultPath(); + } catch { + // If vault path unavailable, treat all paths as external + vaultPath = ''; + } let isVaultRelative = false; let vaultRelativeDir = outputDir;