mirror of
https://github.com/bol-van/zapret.git
synced 2025-01-27 10:30:35 +05:00
nfqws,tpws: file_mod_signature zero struct if unsuccessful
This commit is contained in:
parent
b39508de7f
commit
f5cf7917fb
@ -303,7 +303,11 @@ time_t file_mod_time(const char *filename)
|
||||
bool file_mod_signature(const char *filename, file_mod_sig *ms)
|
||||
{
|
||||
struct stat st;
|
||||
if (stat(filename,&st)==-1) return false;
|
||||
if (stat(filename,&st)==-1)
|
||||
{
|
||||
FILE_MOD_RESET(ms);
|
||||
return false;
|
||||
}
|
||||
ms->mod_time=st.st_mtime;
|
||||
ms->size=st.st_size;
|
||||
return true;
|
||||
|
@ -317,7 +317,11 @@ time_t file_mod_time(const char *filename)
|
||||
bool file_mod_signature(const char *filename, file_mod_sig *ms)
|
||||
{
|
||||
struct stat st;
|
||||
if (stat(filename,&st)==-1) return false;
|
||||
if (stat(filename,&st)==-1)
|
||||
{
|
||||
FILE_MOD_RESET(ms);
|
||||
return false;
|
||||
}
|
||||
ms->mod_time=st.st_mtime;
|
||||
ms->size=st.st_size;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user