mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-28 10:36:45 +02:00
Fix error messages being printed when autorun_path is unset.
This commit is contained in:
@ -169,9 +169,14 @@ void invoke_autoruns(WINDOW *window, ToxWindow *self)
|
||||
struct dirent *dir;
|
||||
char abspath_buf[PATH_MAX + 1], err_buf[PATH_MAX + 1];
|
||||
size_t path_len;
|
||||
DIR *d = opendir(user_settings->autorun_path);
|
||||
DIR *d;
|
||||
FILE *fp;
|
||||
|
||||
if (user_settings->autorun_path[0] == '\0')
|
||||
return;
|
||||
|
||||
d = opendir(user_settings->autorun_path);
|
||||
|
||||
if (d == NULL) {
|
||||
snprintf(err_buf, PATH_MAX + 1, "Autorun path does not exist: %s", user_settings->autorun_path);
|
||||
api_display(err_buf);
|
||||
|
Reference in New Issue
Block a user