Skip to content

Commit b171ef9

Browse files
author
zhangzifa
committed
bypass empty file when upload
1 parent ada54bb commit b171ef9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

upload_file

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ fi
1111
FULL_PATH=$2
1212
TARGET_PATH=$2
1313

14+
filesize=`ls -l $FULL_PATH|awk '{print $5}'`
15+
16+
if [ "$filesize" = 0 ]; then
17+
echo '空文件'
18+
exit 1
19+
fi
20+
1421
GZIP=`which gzip`
1522

1623
if [ $GZIP ] && [ -f "$FULL_PATH" ]; then

0 commit comments

Comments
 (0)