remove time check
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
2d7bebb54b
commit
5bd8befb0f
@ -143,7 +143,7 @@ pub enum NetworkType {
|
|||||||
|
|
||||||
#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
|
#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
#[serde(default)]
|
#[serde(default, skip_serializing_if = "String::is_empty")]
|
||||||
pub id: String, // use
|
pub id: String, // use
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
enc_id: String, // store
|
enc_id: String, // store
|
||||||
@ -434,11 +434,14 @@ impl Config {
|
|||||||
config.id = id;
|
config.id = id;
|
||||||
id_valid = true;
|
id_valid = true;
|
||||||
store |= store2;
|
store |= store2;
|
||||||
} else if crate::get_modified_time(&Self::file_(""))
|
} else if
|
||||||
.checked_sub(std::time::Duration::from_secs(30)) // allow modification during installation
|
// Comment out for forward compatible
|
||||||
.unwrap_or_else(crate::get_exe_time)
|
// crate::get_modified_time(&Self::file_(""))
|
||||||
< crate::get_exe_time()
|
// .checked_sub(std::time::Duration::from_secs(30)) // allow modification during installation
|
||||||
&& !config.id.is_empty()
|
// .unwrap_or_else(crate::get_exe_time)
|
||||||
|
// < crate::get_exe_time()
|
||||||
|
// &&
|
||||||
|
!config.id.is_empty()
|
||||||
&& config.enc_id.is_empty()
|
&& config.enc_id.is_empty()
|
||||||
&& !decrypt_str_or_original(&config.id, PASSWORD_ENC_VERSION).1
|
&& !decrypt_str_or_original(&config.id, PASSWORD_ENC_VERSION).1
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user