use sha-1/hmac
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
use std::{
|
||||
cmp::{min, max, },
|
||||
fs,
|
||||
path::Path,
|
||||
cmp::{
|
||||
min,
|
||||
max,
|
||||
},
|
||||
};
|
||||
use rust_util::{
|
||||
iff,
|
||||
@@ -9,9 +12,7 @@ use rust_util::{
|
||||
new_box_ioerror,
|
||||
util_msg::*,
|
||||
};
|
||||
use chrono::{
|
||||
Utc,
|
||||
};
|
||||
use chrono::Utc;
|
||||
|
||||
pub const ETC_OSS_BACKUPD_CONFIG: &str = "/etc/oss-backupd/config.json";
|
||||
pub const OSS_BACKUPD_CONFIG: &str = "oss-backupd-config.json";
|
||||
@@ -100,7 +101,10 @@ impl OSSBackupdConfigItem {
|
||||
|
||||
pub fn get_safe_backup_count(&self) -> usize {
|
||||
min(
|
||||
max(self.backup_count.unwrap_or(10u32) as usize, 1_usize),
|
||||
max(
|
||||
self.backup_count.unwrap_or(10u32) as usize,
|
||||
1_usize
|
||||
),
|
||||
1000_usize
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user