Automatically install new entry directory in EntryRefresh()

This commit is contained in:
2025-05-31 20:41:30 -04:00
parent 038cd3670d
commit 4dab9f2c93
+10
View File
@@ -104,6 +104,16 @@ func EntryRefresh(oldRCWPassphrase, newRCWPassphrase []byte, removeOldDir bool)
}
}
// swap the new directory with the old one
err = os.Rename(global.EntryRoot, global.EntryRoot+"-old")
if err != nil {
return errors.New("unable to rename old directory: " + err.Error())
}
err = os.Rename(global.EntryRoot+"-new", global.EntryRoot)
if err != nil {
return errors.New("unable to rename new directory: " + err.Error())
}
return nil
}