mirror of
https://github.com/bol-van/zapret.git
synced 2025-05-06 10:40:48 +05:00
nfqws,tpws: check list files accessibility after all params are parsed
This commit is contained in:
parent
bda4226162
commit
a426ea6dad
@ -287,11 +287,13 @@ static struct hostlist_file *RegisterHostlist_(struct hostlist_files_head *hostl
|
|||||||
}
|
}
|
||||||
struct hostlist_file *RegisterHostlist(struct desync_profile *dp, bool bExclude, const char *filename)
|
struct hostlist_file *RegisterHostlist(struct desync_profile *dp, bool bExclude, const char *filename)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (filename && !file_mod_time(filename))
|
if (filename && !file_mod_time(filename))
|
||||||
{
|
{
|
||||||
DLOG_ERR("cannot access hostlist file '%s'\n",filename);
|
DLOG_ERR("cannot access hostlist file '%s'\n",filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return RegisterHostlist_(
|
return RegisterHostlist_(
|
||||||
¶ms.hostlists,
|
¶ms.hostlists,
|
||||||
bExclude ? &dp->hl_collection_exclude : &dp->hl_collection,
|
bExclude ? &dp->hl_collection_exclude : &dp->hl_collection,
|
||||||
|
@ -2887,6 +2887,9 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!test_list_files())
|
||||||
|
exit_clean(1);
|
||||||
|
|
||||||
if (!LoadAllHostLists())
|
if (!LoadAllHostLists())
|
||||||
{
|
{
|
||||||
DLOG_ERR("hostlists load failed\n");
|
DLOG_ERR("hostlists load failed\n");
|
||||||
|
@ -287,11 +287,13 @@ static struct hostlist_file *RegisterHostlist_(struct hostlist_files_head *hostl
|
|||||||
}
|
}
|
||||||
struct hostlist_file *RegisterHostlist(struct desync_profile *dp, bool bExclude, const char *filename)
|
struct hostlist_file *RegisterHostlist(struct desync_profile *dp, bool bExclude, const char *filename)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (filename && !file_mod_time(filename))
|
if (filename && !file_mod_time(filename))
|
||||||
{
|
{
|
||||||
DLOG_ERR("cannot access hostlist file '%s'\n",filename);
|
DLOG_ERR("cannot access hostlist file '%s'\n",filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return RegisterHostlist_(
|
return RegisterHostlist_(
|
||||||
¶ms.hostlists,
|
¶ms.hostlists,
|
||||||
bExclude ? &dp->hl_collection_exclude : &dp->hl_collection,
|
bExclude ? &dp->hl_collection_exclude : &dp->hl_collection,
|
||||||
|
@ -1638,6 +1638,9 @@ void parse_params(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!test_list_files())
|
||||||
|
exit_clean(1);
|
||||||
|
|
||||||
if (!LoadAllHostLists())
|
if (!LoadAllHostLists())
|
||||||
{
|
{
|
||||||
DLOG_ERR("hostlists load failed\n");
|
DLOG_ERR("hostlists load failed\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user