Skip to content

Commit

Permalink
Just warn if .cfm files are found alongside .clifm files
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-arch committed Aug 24, 2022
1 parent 36d9f24 commit 284de18
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,19 @@ check_cfm_files(void)
if (stat(q, &a) == -1)
return;

/* Old .cfm files found alongside new .clifm files. This happens if
* the user says "no" when asked about replacing old files. Just warn the user */
char qq[PATH_MAX + 19];
snprintf(qq, sizeof(qq), "%s/keybindings.clifm", config_dir_gral);
if (stat(qq, &a) == EXIT_SUCCESS) {
_err('n', PRINT_PROMPT, "%s: Old .cfm config files were found "
"in %s directory. They will not be used anymore: remove/rename "
"them (to .clifm files) to silence this warning.\n", PROGRAM_NAME,
config_dir_gral);
return;
}


fprintf(stderr, "##################\n"
"# IMPORTANT NOTE #\n"
"##################\n\n"
Expand Down

0 comments on commit 284de18

Please sign in to comment.