Mercurial > hgrepos > hgweb.cgi > s4
changeset 731:33df7d50532e
Empty-repost workaround in EDIT mode added
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 01 Jun 2020 20:25:02 +0900 |
parents | 2c0c25fc9f68 |
children | 98702a1251cd |
files | s4-funcs.sh |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Mon Jun 01 19:31:36 2020 +0900 +++ b/s4-funcs.sh Mon Jun 01 20:25:02 2020 +0900 @@ -3741,7 +3741,7 @@ 書き込み直後のリロードなので上書きを回避します。 最新記事は末尾の「再読み込み」ボタンから見てください。 EOF - err "Repost aid=$aid Browser=[$HTTP_USER_AGENT]" + err "Repost aid=$aid Browser=[$HTTP_USER_AGENT] user=$user" return 9 # STOP Duplicated posting fi fi @@ -3800,6 +3800,10 @@ case `gettbl_coltype $tbl/$origcol` in image|document|binary) file=$tmpd/`getparfilename $v` + if [ ! -s "$file" ]; then # Maybe stupid REPOST + err "Empty REPOST by [$HTTP_USER_AGENT] user=$user" + continue + fi ## err type=file=$file [ -z "$file" ] && continue bn=`sqlquotestr "${file##*/}"`