Skip to content

Commit

Permalink
Fixing unix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
deven96 committed Oct 26, 2024
1 parent cd91d06 commit 3c250c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ahnlich/utils/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::{ArgAction, Args};
use std::os::unix::fs::MetadataExt;
use std::fs;
use std::sync::OnceLock;

static DEFAULT_CONFIG: OnceLock<CommandLineConfig> = OnceLock::new();
Expand Down Expand Up @@ -112,7 +112,7 @@ pub fn validate_persistence(
let path = path_file.as_path();
if path.is_file() {
let file_metadata = std::fs::metadata(path).map_err(|err| err.to_string())?;
if (allocated_size / file_metadata.size() as usize) < 2 {
if (allocated_size / file_metadata.len() as usize) < 2 {
return Err(
"Allocated memory should be more than two times your persistence_file size"
.to_string(),
Expand Down

0 comments on commit 3c250c3

Please sign in to comment.