summaryrefslogtreecommitdiffstats
path: root/trans/sob_trans.c
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-25 12:23:22 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-25 12:23:22 +0800
commitbe5b80cbc2f185920cf02679bb5fca7fd3360ca6 (patch)
tree419106cea6b481d91c4ccb9da45d50bc85cef3d0 /trans/sob_trans.c
parentff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847 (diff)
downloadpttbbs-be5b80cbc2f185920cf02679bb5fca7fd3360ca6.tar
pttbbs-be5b80cbc2f185920cf02679bb5fca7fd3360ca6.tar.gz
pttbbs-be5b80cbc2f185920cf02679bb5fca7fd3360ca6.tar.bz2
pttbbs-be5b80cbc2f185920cf02679bb5fca7fd3360ca6.tar.lz
pttbbs-be5b80cbc2f185920cf02679bb5fca7fd3360ca6.tar.xz
pttbbs-be5b80cbc2f185920cf02679bb5fca7fd3360ca6.tar.zst
pttbbs-be5b80cbc2f185920cf02679bb5fca7fd3360ca6.zip
Typo for marked files.
Touch timestamp/rebuild for board/man git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4323 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'trans/sob_trans.c')
-rw-r--r--trans/sob_trans.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/trans/sob_trans.c b/trans/sob_trans.c
index bc92c095..35cffbc7 100644
--- a/trans/sob_trans.c
+++ b/trans/sob_trans.c
@@ -42,7 +42,7 @@ int convert(const char *oldpath, char *newpath)
fhdr.modified = dasht(buf);
if (whdr.filemode & SOB_FILE_MARKED)
- fhdr.filemode | FILE_MARKED;
+ fhdr.filemode |= FILE_MARKED;
copy_file(buf, newpath);
}
@@ -95,6 +95,14 @@ int main(int argc, char *argv[])
return 0;
}
+ attach_SHM();
+ opt = getbnum(board);
+
+ if (opt == 0) {
+ fprintf(stderr, "ERR: board `%s' not found\n", board);
+ return 0;
+ }
+
if (trans_man)
setapath(buf, board);
else
@@ -105,9 +113,15 @@ int main(int argc, char *argv[])
return 0;
}
- attach_SHM();
-
convert(path, buf);
+ if (trans_man) {
+ strlcat(buf, "/.rebuild", sizeof(buf));
+ if ((opt = open(buf, O_CREAT, 0640)) > 0)
+ close(opt);
+ }
+ else
+ touchbtotal(opt);
+
return 0;
}