summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-25 09:30:45 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-25 09:30:45 +0800
commit17712d579d66d9ca51af5ad9c778742d484cdf93 (patch)
treeae1291faf7a6a8f3dc2283ddbeeb20b33904ae29 /mbbsd
parentcf7e014460c6bf853adb3e3b0e3e20980bd33841 (diff)
downloadpttbbs-17712d579d66d9ca51af5ad9c778742d484cdf93.tar
pttbbs-17712d579d66d9ca51af5ad9c778742d484cdf93.tar.gz
pttbbs-17712d579d66d9ca51af5ad9c778742d484cdf93.tar.bz2
pttbbs-17712d579d66d9ca51af5ad9c778742d484cdf93.tar.lz
pttbbs-17712d579d66d9ca51af5ad9c778742d484cdf93.tar.xz
pttbbs-17712d579d66d9ca51af5ad9c778742d484cdf93.tar.zst
pttbbs-17712d579d66d9ca51af5ad9c778742d484cdf93.zip
- fix safe del header rule: when deleteing 'already deleted' files, should not show current userid.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4244 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/record.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mbbsd/record.c b/mbbsd/record.c
index 2255f5e3..a5263e0e 100644
--- a/mbbsd/record.c
+++ b/mbbsd/record.c
@@ -386,16 +386,16 @@ delete_range(const char *fpath, int id1, int id2)
void
set_safedel_fhdr(fileheader_t *fhdr)
{
- if (fhdr->filemode & FILE_ANONYMOUS)
+ if (fhdr->filemode & FILE_ANONYMOUS ||
+ !fhdr->owner[0] ||
+ (fhdr->owner[0] == '-' && fhdr->owner[1] == 0) )
{
// not putting owner because we can't know
// if it is deleted by BM or owner.
snprintf(fhdr->title, sizeof(fhdr->title),
"%s", STR_SAFEDEL_TITLE);
- }
- else if ( strcmp(fhdr->owner, cuser.userid) == 0 ||
- !fhdr->owner[0] ||
- (fhdr->owner[0] == '-' && fhdr->owner[1] == 0) )
+ }
+ else if ( strcmp(fhdr->owner, cuser.userid) == 0 )
{
// i'm the one to delete it, or if the owner is corpse.
snprintf(fhdr->title, sizeof(fhdr->title),