case PL_UNIX_FILENAME_NAME:
parser->item_length++;
if(c == '\r') {
- parser->item_length--;
parser->state.UNIX.sub.filename = PL_UNIX_FILENAME_WINDOWSEOL;
}
else if(c == '\n') {
break;
case PL_UNIX_FILENAME_WINDOWSEOL:
if(c == '\n') {
- finfo->b_data[parser->item_offset + parser->item_length] = 0;
+ finfo->b_data[parser->item_offset + parser->item_length - 1] = 0;
parser->offsets.filename = parser->item_offset;
parser->state.UNIX.main = PL_UNIX_FILETYPE;
result = ftp_pl_insert_finfo(conn, finfo);
}
break;
case PL_UNIX_SYMLINK_TARGET:
- parser->item_length ++;
+ parser->item_length++;
if(c == '\r') {
- parser->item_length --;
parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_WINDOWSEOL;
}
else if(c == '\n') {