refactor(tfm): change config file location

This commit is contained in:
Masahiko AMANO 2023-02-20 23:46:59 +03:00
parent 1c62fd8219
commit 6e105f6aa9

View File

@ -7,7 +7,7 @@
#include "../../include/tanabata.h"
// TFM configuration directory
#define TFM_CONFIG_DIR "/etc/tfm/"
#define TFM_CONFIG_DIR "/etc/tanabata/"
// Stylization macros
#define TABLE_HEADER(s) ""s""
@ -363,7 +363,7 @@ int main(int argc, char **argv) {
return 1;
}
char *tanabata_path;
FILE *config = fopen(TFM_CONFIG_DIR"/config", "r");
FILE *config = fopen(TFM_CONFIG_DIR"tfm-cli.conf", "r");
if (config == NULL) {
tanabata_path = NULL;
struct stat st;
@ -374,7 +374,7 @@ int main(int argc, char **argv) {
return 1;
}
}
config = fopen(TFM_CONFIG_DIR"/config", "w");
config = fopen(TFM_CONFIG_DIR"tfm-cli.conf", "w");
if (config == NULL) {
fprintf(stderr, ERROR("Failed to create config file. "
"Try again with 'sudo' or check your permissions")"\n");