()
| 21 | import { getSpaceDirPath } from './spaces' |
| 22 | |
| 23 | export function getVaultPath(): string { |
| 24 | const configuredVaultPath = store.preferences.get('storage.vaultPath') as |
| 25 | | string |
| 26 | | null |
| 27 | | undefined |
| 28 | |
| 29 | if (configuredVaultPath && configuredVaultPath.trim()) { |
| 30 | return configuredVaultPath |
| 31 | } |
| 32 | |
| 33 | const storagePath = store.preferences.get('storage.rootPath') as string |
| 34 | return path.join(storagePath, 'markdown-vault') |
| 35 | } |
| 36 | |
| 37 | interface LegacyStateFolderLike { |
| 38 | id: number |
no test coverage detected