Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Indy 10 FTP Server question

77 views
Skip to first unread message

snorkel

unread,
Nov 24, 2004, 12:45:11 AM11/24/04
to
Hi,
I am playing around with the Indy 10 FTP server and when I do a dir listing
after a change directory I see some weird data in the apath var

for example if I cd to c:\companies\1000

I see in :
APath 'c:\companies\1001\//'

Why are the // at the end?

Thanks,


T


Don Siders

unread,
Nov 24, 2004, 7:36:22 AM11/24/04
to
> I am playing around with the Indy 10 FTP server and when I do a dir listing
> after a change directory I see some weird data in the apath var

> for example if I cd to c:\companies\1000

> I see in :
> APath 'c:\companies\1001\//'

Where (which event handler)?

Is the directory being sent in that format from the client? If so, it should be using a relative path like '/' or '/companies/1001' for unix-style paths or '\' and '\companies\1001' for msdos-style paths. The server is responsible for resolving the relative path to the local file system using either the event handlers or the FTPFileSystem the server implements.

Check the PathProcessing and DirFormat properties to see what is curreNtly in use in the FTP server.

hth...


tony caduto

unread,
Nov 25, 2004, 3:37:51 AM11/25/04
to
I see this in the onlistdir event

>>APath 'c:\companies\1001\//'


In the on user logon I am setting:
Asender.homedir:= 'c:\companies\1000\';
Asender.currentdir:= Asender.homedir;

Also after a I do two on change dir events the last one I did gets
concatenated with the new one.

Later,

Tony

Don Siders

unread,
Nov 25, 2004, 4:20:25 AM11/25/04
to
> I see this in the onlistdir event

> >>APath 'c:\companies\1001\//'

> In the on user logon I am setting:
> Asender.homedir:= 'c:\companies\1000\';
> Asender.currentdir:= Asender.homedir;

HomeDir is the virtual root directory for the user, and CurrentDir is supposed to be relative to the virtual root. After logging in, the CurrentDir is supposed to be the same (relatively speaking) as the users home directory.

For instance:

ASender.HomeDir := 'c:\ftpsvc\users\' + ASender.Username;
ASender.CurrentDir := '\';


> Also after a I do two on change dir events the last one I did gets
> concatenated with the new one.

Try setting only the users home directory in OnAfterUserLogin, and see if the problem persists.

0 new messages