mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-13 02:33:03 +01:00
small fix
This commit is contained in:
parent
4de22d067a
commit
cf3f6750eb
@ -508,7 +508,7 @@ static void first_time_running(void)
|
||||
system("clear");
|
||||
printf("Encrypt data file? Y/n \n");
|
||||
|
||||
if (!strcasecmp(ch, "y\n") || !strcasecmp(ch, "n\n"))
|
||||
if (!strcmp(ch, "y\n") || !strcmp(ch, "n\n"))
|
||||
break;
|
||||
|
||||
} while (fgets(ch, sizeof(ch), stdin));
|
||||
@ -901,9 +901,9 @@ int main(int argc, char *argv[])
|
||||
/* Make sure all written files are read/writeable only by the current user. */
|
||||
umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
int config_err = init_default_data_files();
|
||||
bool first_run = !file_exists(DATA_FILE);
|
||||
|
||||
if (first_run)
|
||||
/* if first time using given data file prompt for data encryption */
|
||||
if (!file_exists(DATA_FILE))
|
||||
first_time_running();
|
||||
|
||||
/* init user_settings struct and load settings from conf file */
|
||||
|
Loading…
Reference in New Issue
Block a user