diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-03-10 01:29:36 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-03-10 01:29:36 +0800 |
commit | 90451291f8f509d0f0e3f1c442bb3325de30d9b0 (patch) | |
tree | 1d5737feb5cb95e231206b875c21d2d8f88607c6 /innbbsd/bbslink2.c | |
parent | a0baab6a9bbe6e76779927273f3faeba5b4d3990 (diff) | |
download | pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.gz pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.bz2 pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.lz pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.xz pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.zst pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.zip |
boards/<hash>/<brdname>
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@15 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'innbbsd/bbslink2.c')
-rw-r--r-- | innbbsd/bbslink2.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/innbbsd/bbslink2.c b/innbbsd/bbslink2.c index d79c23a9..70d39766 100644 --- a/innbbsd/bbslink2.c +++ b/innbbsd/bbslink2.c @@ -427,7 +427,7 @@ save_article(board, filename, sover) if (Verbose) printf("<save_article> %s %s\n", board, filename); - FN = fopen(fileglue("%s/boards/%s/%s", BBSHOME, board, filename), "w"); + FN = fopen(fileglue("%s/boards/%c/%s/%s", BBSHOME, board[0], board, filename), "w"); if (FN == NULL) { bbslog("<save_article> err: %s %s\n", board, filename); @@ -451,7 +451,7 @@ save_article(board, filename, sover) times.actime = sover->mtime; times.modtime = sover->mtime; - utime(fileglue("%s/boards/%s/%s", BBSHOME, board, filename), ×); + utime(fileglue("%s/boards/%c/%s/%s", BBSHOME, board[0], board, filename), ×); utime(fileglue("%s/.bcache/%s", BBSHOME, board), NULL); } #endif @@ -475,7 +475,7 @@ process_article(board, filename, userid, nickname, subject) { subject = "µLĂD"; } - filepath = fileglue("%s/boards/%s/%s", BBSHOME, board, filename); + filepath = fileglue("%s/boards/%c/%s/%s", BBSHOME, board[0], board, filename); if (isfile(filepath)) { linkoverview_t lover; @@ -649,17 +649,17 @@ read_outgoing(sover) #endif } BODY = ""; - FD = open(fileglue("%s/boards/%s/%s", BBSHOME, board, filename), O_RDONLY); + FD = open(fileglue("%s/boards/%c/%s/%s", BBSHOME, board[0], board, filename), O_RDONLY); if (FD < 0) { if (Verbose) - printf(" !! can't open %s/boards/%s/%s\n", BBSHOME, board, filename); + printf(" !! can't open %s/boards/%c/%s/%s\n", BBSHOME, board[0], board, filename); else - fprintf(stderr, "can't open %s/boards/%s/%s\n", BBSHOME, board, filename); + fprintf(stderr, "can't open %s/boards/%c/%s/%s\n", BBSHOME, board[0], board, filename); return -1; } - FD_SIZE = filesize(fileglue("%s/boards/%s/%s", BBSHOME, board, filename)); + FD_SIZE = filesize(fileglue("%s/boards/%c/%s/%s", BBSHOME, board[0], board, filename)); if (FD_BUF == NULL) { FD_BUF = (char *) mymalloc(FD_SIZE + 1 + strlen(COMMENT)); @@ -676,7 +676,7 @@ read_outgoing(sover) FD_END += strlen(COMMENT); if (Verbose) { - printf("<read in> %s/boards/%s/%s\n", BBSHOME, board, filename); + printf("<read in> %s/boards/%c/%s/%s\n", BBSHOME, board[0], board, filename); } *ORGANIZATION = '\0'; @@ -1248,7 +1248,7 @@ cancel_outgoing(board, filename, from, subject) bbslog("<cancel_outgoing> Try to move moderated post from %s to deleted\n", board); if (Verbose) printf("Try to move moderated post from %s to deleted\n", board); - FN = popen(fileglue("%s/bbspost post %s/boards/deleted > %s", + FN = popen(fileglue("%s/bbspost post %s/boards/d/deleted > %s", INNDHOME, BBSHOME, TMPFILE), "w"); if (FN == NULL) { @@ -1270,7 +1270,7 @@ cancel_outgoing(board, filename, from, subject) if (strncmp(result, "post to ", 8) == 0) { /* try to remove it */ - strncpy(filepath, fileglue("%s/boards/%s/%s", BBSHOME, board, filename), sizeof filepath); + strncpy(filepath, fileglue("%s/boards/%c/%s/%s", BBSHOME, board[0], board, filename), sizeof filepath); if (isfile(filepath)) { Rename(filepath, fileglue("%s.cancel", filepath)); @@ -1691,7 +1691,7 @@ woju /* woju */ - sprintf(OUTING, "%s/boards/%s/", BBSHOME, argv[1]); + sprintf(OUTING, "%s/boards/%c/%s/", BBSHOME, argv[1][0], argv[1]); fname = OUTING + strlen(OUTING); if (initial_bbs("link") == 0) |