judge read_bytes > 0
parent
fa8331340f
commit
51e9da9a77
|
|
@ -1992,8 +1992,10 @@ static int tracker_deal_get_one_sys_file(struct fast_task_info *pTask)
|
|||
long2buff(file_stat.st_size, p);
|
||||
p += FDFS_PROTO_PKG_LEN_SIZE;
|
||||
|
||||
if (read_bytes > 0)
|
||||
{
|
||||
bytes = read_bytes + 1;
|
||||
if (read_bytes > 0 && (result=getFileContentEx(full_filename, \
|
||||
if ((result=getFileContentEx(full_filename, \
|
||||
p, offset, &bytes)) != 0)
|
||||
{
|
||||
pTask->length = sizeof(TrackerHeader);
|
||||
|
|
@ -2010,6 +2012,7 @@ static int tracker_deal_get_one_sys_file(struct fast_task_info *pTask)
|
|||
pTask->length = sizeof(TrackerHeader);
|
||||
return EIO;
|
||||
}
|
||||
}
|
||||
|
||||
p += read_bytes;
|
||||
pTask->length = p - pTask->data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue