rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - champignac

Pages: 1
1
Bug reports / Re: Faild to upload file with hebrew filename
« on: March 11, 2008, 03:00:40 AM »
hi :)

Same problem with french char likes é è à ê ü.

I'm using HFS v2.2d Build 152.
XP SP2 French
NTFS Files system.

When someone upload a file, it's seems Ok. Like this.

Quote
23:18:19 florian@*.*.*.*:1769 Uploading SoftICE Command Référence.rar
23:19:06 florian@*.*.*.*:1769 Fully uploaded -  575.54 KB @ 12 KB/s

But the file isn't created on my Hard-disk. Same thing occur in local transfert. I suppose is the same problem with all other specials char languages (like chinese).

The same file without french char (SoftICE Command Reference.rar), the upload works fine. File is created and uploaded on my Hard-disk.

Thanks for all :)
Posted on: March 10, 2008, 05:44:08 PM
Bug found :)

Into this function:
Code: [Select]
 function getUploadDestinationFileName():string;
  var
    i: integer;
    fn, ext: string;
  begin
  fn:=optAnsi(tpl.utf8, conn.post.filename);
  if tpl.utf8 then fn:=UTF8toAnsi(fn); <<- bug here
  result:=f.resource+'\'+fn;
  if not numberFilesOnUploadChk.checked then exit;
  ext:=extractFileExt(fn);
  setLength(fn, length(fn)-length(ext));
  i:=0;
  while fileExists(result) do
    begin
    inc(i);
    result:=format('%s\%s(%d)%s', [f.resource,fn,i,ext]);
    end;
  end; // getUploadDestinationFileName

In asm:
Code: [Select]
0051BAB5   .  A1 6C9A5400   MOV EAX, DWORD PTR [549A6C]
0051BABA   .  8078 28 00    CMP BYTE PTR [EAX+28], 0
0051BABE   .  75 0B         JE SHORT 0051BACB                       ;  << JE patched to JMP
0051BAC0   .  8D55 FC       LEA EDX, DWORD PTR [EBP-4]
0051BAC3   .  8B45 FC       MOV EAX, DWORD PTR [EBP-4]
0051BAC6   .  E8 D5B8EEFF   CALL 004073A0                            ;  004073A0
0051BACB   >  8B45 08       MOV EAX, DWORD PTR [EBP+8]

When I'm forcing this conditionnal jump, file is succefully saved into my upload directory with the corrects chars.

I let you decide but it's works for me :)

Pages: 1