| View previous topic :: View next topic |
| Author |
Message |
snorkel Guest
|
Posted: Wed Nov 24, 2004 5:45 am Post subject: Indy 10 FTP Server question |
|
|
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:companies1000
I see in :
APath 'c:companies1001//'
Why are the // at the end?
Thanks,
T
|
|
| Back to top |
|
 |
Don Siders Guest
|
Posted: Wed Nov 24, 2004 12:36 pm Post subject: Re: Indy 10 FTP Server question |
|
|
| Quote: | 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:companies1000
I see in :
APath 'c:companies1001//'
|
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 'companies1001' 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...
|
|
| Back to top |
|
 |
tony caduto Guest
|
Posted: Thu Nov 25, 2004 8:37 am Post subject: Re: Indy 10 FTP Server question |
|
|
I see this in the onlistdir event
| Quote: | APath 'c:companies1001//'
|
In the on user logon I am setting:
Asender.homedir:= 'c:companies1000';
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
|
|
| Back to top |
|
 |
Don Siders Guest
|
Posted: Thu Nov 25, 2004 9:20 am Post subject: Re: Indy 10 FTP Server question |
|
|
| Quote: | I see this in the onlistdir event
APath 'c:companies1001//'
In the on user logon I am setting:
Asender.homedir:= 'c:companies1000';
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:ftpsvcusers' + ASender.Username;
ASender.CurrentDir := '';
| Quote: | 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.
|
|
| Back to top |
|
 |
|