summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-25 13:32:23 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-25 13:32:23 +0800
commitdc98fd2dabcb26ecb04871b6222d2cdecb488cb2 (patch)
tree6cd169d67acf0d762f6069acdc695cd505669d84 /util
parent85eafdb25f2f71498f4ad7c23d51cc97ba989f94 (diff)
downloadpttbbs-dc98fd2dabcb26ecb04871b6222d2cdecb488cb2.tar
pttbbs-dc98fd2dabcb26ecb04871b6222d2cdecb488cb2.tar.gz
pttbbs-dc98fd2dabcb26ecb04871b6222d2cdecb488cb2.tar.bz2
pttbbs-dc98fd2dabcb26ecb04871b6222d2cdecb488cb2.tar.lz
pttbbs-dc98fd2dabcb26ecb04871b6222d2cdecb488cb2.tar.xz
pttbbs-dc98fd2dabcb26ecb04871b6222d2cdecb488cb2.tar.zst
pttbbs-dc98fd2dabcb26ecb04871b6222d2cdecb488cb2.zip
avoid empty filenames
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3863 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/expire.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/expire.c b/util/expire.c
index d24c29d6..28a92d39 100644
--- a/util/expire.c
+++ b/util/expire.c
@@ -145,8 +145,10 @@ void expire(life_t *brd)
}
else {
++nDelete;
- setbfile(fname, brd->bname, head.filename);
- callrm(fname);
+ if (head.filename[0] != '\0') {
+ setbfile(fname, brd->bname, head.filename);
+ callrm(fname);
+ }
total--;
}
}