diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/gamble.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index 0566861a..e752debd 100644 --- a/mbbsd/gamble.c +++ b/mbbsd/gamble.c @@ -106,6 +106,11 @@ append_ticket_record(char *direct, int ch, int n, int count) } snprintf(genbuf, sizeof(genbuf), "%s/" FN_TICKET_RECORD, direct); + + if (!dashf(genbuf)) { + creat(genbuf, S_IRUSR | S_IWUSR); + } + if ((fp = fopen(genbuf, "r+"))) { flock(fileno(fp), LOCK_EX); |