Commit a426ea6d authored by bol-van's avatar bol-van
Browse files

nfqws,tpws: check list files accessibility after all params are parsed

parent bda42261
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)
{
/*
	if (filename && !file_mod_time(filename))
	{
		DLOG_ERR("cannot access hostlist file '%s'\n",filename);
		return NULL;
	}
*/
	return RegisterHostlist_(
		&params.hostlists,
		bExclude ? &dp->hl_collection_exclude : &dp->hl_collection,
+3 −0
Original line number Diff line number Diff line
@@ -2887,6 +2887,9 @@ int main(int argc, char **argv)
#endif
	}

	if (!test_list_files())
		exit_clean(1);

	if (!LoadAllHostLists())
	{
		DLOG_ERR("hostlists load failed\n");
+2 −0
Original line number Diff line number Diff line
@@ -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)
{
/*
	if (filename && !file_mod_time(filename))
	{
		DLOG_ERR("cannot access hostlist file '%s'\n",filename);
		return NULL;
	}
*/
	return RegisterHostlist_(
		&params.hostlists,
		bExclude ? &dp->hl_collection_exclude : &dp->hl_collection,
+3 −0
Original line number Diff line number Diff line
@@ -1638,6 +1638,9 @@ void parse_params(int argc, char *argv[])
	}
#endif

	if (!test_list_files())
		exit_clean(1);

	if (!LoadAllHostLists())
	{
		DLOG_ERR("hostlists load failed\n");