fix error prints

This commit is contained in:
Felix Kratz 2023-03-22 15:58:11 +01:00
parent b0f4730dda
commit 1327dbc12a

View file

@ -130,24 +130,24 @@ static bool get_config_file(char *restrict filename, char *restrict buffer, int
static void exec_config_file(void) {
if (!*g_config_file
&& !get_config_file("sketchybarrc", g_config_file, sizeof(g_config_file))) {
printf("could not locate config file..");
printf("could not locate config file..\n");
return;
}
if (!file_exists(g_config_file)) {
printf("file '%s' does not exist..", g_config_file);
printf("file '%s' does not exist..\n", g_config_file);
return;
}
setenv("CONFIG_DIR", dirname(g_config_file), 1);
if (!ensure_executable_permission(g_config_file)) {
printf("could not set the executable permission bit for '%s'", g_config_file);
printf("could not set the executable permission bit for '%s'\n", g_config_file);
return;
}
if (!fork_exec(g_config_file, NULL)) {
printf("failed to execute file '%s'", g_config_file);
printf("failed to execute file '%s'\n", g_config_file);
return;
}
}