mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:33:02 +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");
|
system("clear");
|
||||||
printf("Encrypt data file? Y/n \n");
|
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;
|
break;
|
||||||
|
|
||||||
} while (fgets(ch, sizeof(ch), stdin));
|
} 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. */
|
/* Make sure all written files are read/writeable only by the current user. */
|
||||||
umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||||
int config_err = init_default_data_files();
|
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();
|
first_time_running();
|
||||||
|
|
||||||
/* init user_settings struct and load settings from conf file */
|
/* init user_settings struct and load settings from conf file */
|
||||||
|
Loading…
Reference in New Issue
Block a user