diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-11-07 10:33:40 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-11-07 10:33:40 +0800 |
commit | 1d1ce992d498b4756eba670afbf447302a4a7e97 (patch) | |
tree | 8182c3ce2921fb20831d745981d459539b689ba2 | |
parent | 96b0fd7c1203a8f9cc4aeeac6b2a94c303b9864d (diff) | |
download | pttbbs-1d1ce992d498b4756eba670afbf447302a4a7e97.tar pttbbs-1d1ce992d498b4756eba670afbf447302a4a7e97.tar.gz pttbbs-1d1ce992d498b4756eba670afbf447302a4a7e97.tar.bz2 pttbbs-1d1ce992d498b4756eba670afbf447302a4a7e97.tar.lz pttbbs-1d1ce992d498b4756eba670afbf447302a4a7e97.tar.xz pttbbs-1d1ce992d498b4756eba670afbf447302a4a7e97.tar.zst pttbbs-1d1ce992d498b4756eba670afbf447302a4a7e97.zip |
do not log things for symlinks
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5219 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/record.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pttbbs/mbbsd/record.c b/pttbbs/mbbsd/record.c index 28056e88..014b6bab 100644 --- a/pttbbs/mbbsd/record.c +++ b/pttbbs/mbbsd/record.c @@ -369,14 +369,16 @@ delete_file_content(const char *direct, const fileheader_t *fh, if (!dashf(fpath)) return DELETE_FILE_CONTENT_FAILED; + // FIXME some announcements were made by sym-links, especial for those + // in mail. we should ignore them. if (backup_direct && + !dashl(fpath) && strncmp(fh->owner, RECYCLE_BIN_OWNER, strlen(RECYCLE_BIN_OWNER)) != 0) { - // FIXME some announcements were made by hard-links, especial for those - // in mail. let's temporary make this tag appear only in board. - if (*direct == 'b') - log_filef(fpath, LOG_CREAT, "\n¡° Deleted by: %s (%s) %s\n", - cuser.userid, fromhost, Cdatelite(&now)); + // FIXME maybe for non-board files we should do this by simply touching + // file instead of full log. + log_filef(fpath, LOG_CREAT, "\n¡° Deleted by: %s (%s) %s\n", + cuser.userid, fromhost, Cdatelite(&now)); // TODO or only memcpy(&backup, fh, sizeof(backup)); ? strlcpy(backup.owner, fh->owner, sizeof(backup.owner)); |