chore: fix build on windows

This commit is contained in:
2026-03-04 15:46:55 +07:00
parent d00c5a1982
commit 80227b3ed3

View File

@@ -1,5 +1,4 @@
use std::collections::{HashMap, HashSet};
use std::os::unix::fs::PermissionsExt;
use std::sync::Arc;
use std::time::Duration;
@@ -923,11 +922,6 @@ fn get_or_init_app_keys() -> Result<Keys, Error> {
std::fs::create_dir_all(dir.parent().unwrap())?;
std::fs::write(&dir, secret_key.to_secret_bytes())?;
// Set permissions to readonly
let mut perms = std::fs::metadata(&dir)?.permissions();
perms.set_mode(0o400);
std::fs::set_permissions(&dir, perms)?;
return Ok(keys);
}
};