songjun54cm / fastdfs

Automatically exported from code.google.com/p/fastdfs
GNU General Public License v3.0
0 stars 0 forks source link

java client v1.23: get_file_info方法的疑问 #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
if ((remote_filename.length() > ProtoCommon.FDFS_FILE_PATH_LEN + 
ProtoCommon.FDFS_FILENAME_BASE64_LENGTH + 
ProtoCommon.FDFS_FILE_EXT_NAME_MAX_LEN + 1) || (file_size == 
ProtoCommon.INFINITE_FILE_SIZE)) {
   //代码。。。
}

我使用upload_appender_file方法上传文件之后,拿回来的fileSize恒�
��0。fdfsdfs java client中的测试例子也是如此。

byte[] buff = 
base64.decodeAuto(remote_filename.substring(ProtoCommon.FDFS_FILE_PATH_LEN, 
ProtoCommon.FDFS_FILE_PATH_LEN+ ProtoCommon.FDFS_FILENAME_BASE64_LENGTH));
long file_size = ProtoCommon.buff2long(buff, 4 * 2);
这两条语句从fileId中解出文件的文件大小数值低32位恒为0.

if语句中的file_size==ProtoCommon.INFINITE_FILE_SIZE是正数,貌似这个�
��件在这个if语句中不会为真,导致appender的文件没有调用query
_file_info方法获取真实的文件大小。

Original issue reported on code.google.com by htd0...@gmail.com on 29 Nov 2012 at 3:06

GoogleCodeExporter commented 9 years ago
恩,我周末看一下这个问题。

Original comment by happyfis...@gmail.com on 30 Nov 2012 at 4:07

GoogleCodeExporter commented 9 years ago
已经在v1.24中修复了。谢谢LZ反馈!

Original comment by happyfis...@gmail.com on 1 Dec 2012 at 5:42