Skip to content

Commit

Permalink
Merge pull request #1749 from profanity-im/minor-improvements
Browse files Browse the repository at this point in the history
Minor improvements
  • Loading branch information
jubalh authored Sep 7, 2022
2 parents 4786073 + 25e56fb commit 68e9de0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
9 changes: 3 additions & 6 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,10 @@ log_init(log_level_t filter, char* log_file)
user_provided_log = TRUE;
}

gchar* lf = files_get_log_file(log_file);
mainlogfile = files_get_log_file(log_file);

logp = fopen(lf, "a");
g_chmod(lf, S_IRUSR | S_IWUSR);
mainlogfile = g_strdup(lf);

g_free(lf);
logp = fopen(mainlogfile, "a");
g_chmod(mainlogfile, S_IRUSR | S_IWUSR);
}

const char*
Expand Down
5 changes: 5 additions & 0 deletions src/profanity.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ _init(char* log_level, char* config_file, char* log_file, char* theme_name)
}

ui_init();
if (prof_log_level == PROF_LEVEL_DEBUG) {
ProfWin* console = wins_get_console();
win_println(console, THEME_DEFAULT, "-", "Debug mode enabled! Logging to: ");
win_println(console, THEME_DEFAULT, "-", get_log_file_location());
}
session_init();
cmd_init();
log_info("Initialising contact list");
Expand Down
4 changes: 2 additions & 2 deletions src/tools/http_download.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ http_file_get(void* userdata)
} else {
if (!download->cancel) {
http_print_transfer_update(download->window, download->url,
"Downloading '%s': done",
download->url);
"Downloading '%s': done\nSaved to '%s'",
download->url, download->filename);
win_mark_received(download->window, download->url);
}
}
Expand Down

0 comments on commit 68e9de0

Please sign in to comment.