fix(dump): Fix the import of dump from the v24 and before

This commit is contained in:
Irevoire 2022-01-13 12:23:02 +01:00 committed by Clémentine Urquizar
parent 0ad7d38eec
commit 38176181ac
No known key found for this signature in database
GPG Key ID: D8E7CC7422E77E1A

View File

@ -29,6 +29,10 @@ impl AuthController {
let keys_file_path = src.as_ref().join(KEYS_PATH); let keys_file_path = src.as_ref().join(KEYS_PATH);
if !keys_file_path.exists() {
return Ok(());
}
let mut reader = BufReader::new(File::open(&keys_file_path)?).lines(); let mut reader = BufReader::new(File::open(&keys_file_path)?).lines();
while let Some(key) = reader.next().transpose()? { while let Some(key) = reader.next().transpose()? {
let key = serde_json::from_str(&key)?; let key = serde_json::from_str(&key)?;