From 7743d6551399fed3035d859d7a7eca519b93c58d Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Thu, 19 Oct 2017 13:27:33 +1000 Subject: [PATCH] Fix seclevel checking --- src/files.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/files.c b/src/files.c index b094866..42a327f 100644 --- a/src/files.c +++ b/src/files.c @@ -1142,7 +1142,6 @@ void file_search() { rc = sqlite3_prepare_v2(db, sqlbuffer, -1, &res, 0); if (rc != SQLITE_OK) { - s_printf("%s\n", sqlite3_errmsg(db)); sqlite3_finalize(res); sqlite3_close(db); for (i=0;isec_level < gUser->sec_level) { + if (conf.file_directories[search_dir]->sec_level > gUser->sec_level) { continue; } for (search_sub = 0; search_sub < conf.file_directories[search_dir]->file_sub_count; search_sub++) { - if (conf.file_directories[search_dir]->file_subs[search_sub]->download_sec_level < gUser->sec_level) { + if (conf.file_directories[search_dir]->file_subs[search_sub]->download_sec_level > gUser->sec_level) { continue; } snprintf(buffer, PATH_MAX, "%s/%s.sq3", conf.bbs_path, conf.file_directories[search_dir]->file_subs[search_sub]->database);