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:
1 file changed
+7
-1
@@ -84,7 +84,13 @@ export class FileDiscovery {
|
|||||||
const pathUtils = new PathUtils(plugin.app);
|
const pathUtils = new PathUtils(plugin.app);
|
||||||
|
|
||||||
// Check if outputDir is inside the vault
|
// 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 isVaultRelative = false;
|
||||||
let vaultRelativeDir = outputDir;
|
let vaultRelativeDir = outputDir;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user