1
0
forked from brl/citadel-tools

Don't update self.last_current here

This commit is contained in:
Bruce Leidl 2021-10-04 06:21:44 -04:00
parent 73acd43329
commit 1418462e2c

View File

@ -85,7 +85,6 @@ impl Realms {
Ok( Realms { realms, manager, last_current: None }) Ok( Realms { realms, manager, last_current: None })
} }
fn all_realms(mark_active: bool) -> Result<Vec<Realm>> { fn all_realms(mark_active: bool) -> Result<Vec<Realm>> {
let mut v = Vec::new(); let mut v = Vec::new();
util::read_directory(Realms::BASE_PATH, |dent| { util::read_directory(Realms::BASE_PATH, |dent| {
@ -271,7 +270,6 @@ impl Realms {
pub fn set_realm_current(&mut self, realm: &Realm) -> Result<()> { pub fn set_realm_current(&mut self, realm: &Realm) -> Result<()> {
symlink::write(realm.run_path(), Self::current_realm_symlink(), true)?; symlink::write(realm.run_path(), Self::current_realm_symlink(), true)?;
self.last_current = Some(realm.clone());
Ok(()) Ok(())
} }