Fix issue w/ existing files not being updated in imfs (#119)

* Fix issue w/ existing files not being updated in imfs

* Add a test for updating files
This commit is contained in:
Paul Doyle
2019-01-31 20:24:42 -08:00
committed by Lucien Greathouse
parent b58fed16b4
commit 0ff59ecb4e
2 changed files with 30 additions and 2 deletions

View File

@@ -208,7 +208,6 @@ impl Imfs {
if self.items.contains_key(&next_path) {
current_path = next_path;
} else {
self.read_from_disk(&current_path)?;
break;
}
},
@@ -216,7 +215,7 @@ impl Imfs {
}
}
Ok(())
self.read_from_disk(&current_path)
}
fn read_from_disk(&mut self, path: &Path) -> Result<(), FsError> {