fix(FileDiscovery): Use PathUtils.getVaultPath() instead of adapter.basePath

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 <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-09-25 16:50:36 +02:00
1 parent f1d545553b
commit 3f138f0b4b
1 file changed
+7 -1
+7 -1
View File
@@ -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;