2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-10 06:25:00 +00:00

Remove obsolute pre-0.3 migrate check

This commit is contained in:
asonix 2023-02-12 23:13:47 -06:00
parent 138499d47f
commit 788b87eceb
3 changed files with 3 additions and 13 deletions

View file

@ -65,6 +65,8 @@ impl Old {
}
pub(super) fn hashes(&self) -> impl std::iter::Iterator<Item = sled::IVec> {
let length = self.filename_tree.len();
tracing::info!("FILENAME_TREE_LEN: {}", length);
self.filename_tree
.iter()
.values()

View file

@ -82,7 +82,7 @@ enum DbVersion {
impl DbVersion {
fn exists(root: PathBuf) -> Self {
if s034::exists(root.clone()) && !s034::migrating(root) {
if s034::exists(root.clone()) {
return DbVersion::Sled034;
}

View file

@ -14,18 +14,6 @@ pub(crate) fn exists(mut base: PathBuf) -> bool {
std::fs::metadata(base).is_ok()
}
pub(crate) fn migrating(base: PathBuf) -> bool {
if let Ok(db) = open(base) {
if let Ok(tree) = db.open_tree("migrate") {
if let Ok(Some(_)) = tree.get("done") {
return false;
}
}
}
true
}
pub(crate) fn open(mut base: PathBuf) -> Result<sled034::Db, Error> {
base.push("sled");
base.push(SLED_034);