FTP server přes synapse (delphi)
Zdravám programatory a rad bych poprosil o pomoc.
Našel jsm na netu jak upravit zdrojak ftpserv co je v baličku ve složce source/demo, aby mi při spuštěni namapoval všechy disky v PC.
Už jsem se o to snažil dřive a probiral to na builder.cz ale bez uspěchu.
V teto době však nefunguje, tak se obracim o pomoc tady.
FTP server při spuštění namapuje všechny disky jak chci ale při kliknuti na disk již nevypiše obsah disku.
Tady je cely ftpthrd.pas http://leteckaposta.cz/732167592
Tady je to cely http://leteckaposta.cz/102961696
function TFtpServerThread.builddrivelist(): string;
var
Drives: array[0..128] of char;
pDrive: PChar;
r: LongWord;
begin
r := GetLogicalDriveStrings(SizeOf(Drives), Drives);
if (r = 0) or (r > SizeOf(Drives)) then Exit;
pDrive := Drives;
while pDrive^ <> #0 do
begin
result := result + 'drwxrwxrwx 1 root root 1 1 Jan 2000 drive' + pDrive^ + CRLF;
inc(pDrive, 4);
end;
end;
/////////////////////////////////////////////////////////////////////////////////////////////////////
function TFtpServerThread.buildlist(value: string): string;
var
SearchRec: TSearchRec;
r: integer;
s: string;
begin
result := '';
if value = '' then
exit;
if value = '\' then
begin
result := builddrivelist();
exit;
end;
if value[length(value)] <> '\' then
end;
//////////////////////////////////////////////////////////////////////////////////////////////////////
function TFtpServerThread.buildrealname(value: string): string;
begin
value := replacestring(value, '..', '.');
value := replacestring(value, '/', '\');
if value = '\' then result := value
else if (length(value) >= 7) and (leftstr(value, 6) = '\drive') and (value[7] in ['A'..'Z']) then
result := value[7] + ':\' + copy(value, 8, length(value))
else
result := '.\data' + value;
end;