Print data dir only in status command

This commit is contained in:
Joscha 2025-05-03 01:09:19 +02:00
parent 19c53e0ee8
commit 427128fe5c
3 changed files with 19 additions and 4 deletions

View file

@ -26,6 +26,12 @@ fn migrate(dir: &LockedDataDir) -> anyhow::Result<()> {
}
}
pub fn read_version(path: PathBuf) -> anyhow::Result<u32> {
let dir = UnlockedDataDir::new(path);
let version = dir.read_version()?;
Ok(version)
}
pub fn open(path: PathBuf) -> anyhow::Result<UnlockedDataDir> {
let dir = UnlockedDataDir::new(path);
dir.require_version(VERSION)?;