summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-28 12:03:55 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-28 12:03:55 +0800
commit52c2b95ecfa594e4e16c0fa346e6006c03b48fe5 (patch)
treec7341390a3393224c024844106e18a62e4b91581 /util
parent0bf5c021474a4609772d6392baf7017ff5426b93 (diff)
downloadpttbbs-52c2b95ecfa594e4e16c0fa346e6006c03b48fe5.tar
pttbbs-52c2b95ecfa594e4e16c0fa346e6006c03b48fe5.tar.gz
pttbbs-52c2b95ecfa594e4e16c0fa346e6006c03b48fe5.tar.bz2
pttbbs-52c2b95ecfa594e4e16c0fa346e6006c03b48fe5.tar.lz
pttbbs-52c2b95ecfa594e4e16c0fa346e6006c03b48fe5.tar.xz
pttbbs-52c2b95ecfa594e4e16c0fa346e6006c03b48fe5.tar.zst
pttbbs-52c2b95ecfa594e4e16c0fa346e6006c03b48fe5.zip
chdir BBSHOME first
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@69 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/account.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/account.c b/util/account.c
index 4b221df4..9d8f6a05 100644
--- a/util/account.c
+++ b/util/account.c
@@ -1,10 +1,11 @@
-/* $Id: account.c,v 1.3 2002/03/09 17:44:30 in2 Exp $ */
+/* $Id: account.c,v 1.4 2002/03/28 04:03:55 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <unistd.h>
#include "config.h"
#include "pttstruct.h"
#include "util.h"
@@ -111,6 +112,7 @@ int main() {
time_t now;
struct tm *ptime;
+ chdir(BBSHOME);
now = time(NULL) - ADJUST_M * 60; /* back to ancent */
ptime = localtime(&now);