Old 06-04-2008, 10:00 AM   #1
flashfxp-friend
Junior Member
 
Join Date: May 2008
Posts: 18
Default PWD Command?

Hello

After each CWD (Change Working Directory) command, FlashFXP sends the PWD (Print Working Directory) command
The question is: why?

I don't know, maybe it's a standard or something, but I've never encountered with a situation when it was helpful
So I suggest you to add an option to turn off PWD command sending after CWD

Thx for the attention
flashfxp-friend is offline  
Old 06-04-2008, 04:44 PM   #2
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,845
Default

bad suggestion.
just because you "CD" somewhere, doesn't mean this is where you'll end up. server can redirect you anywhere it wants to. or for that matter not to allow you to go anywhere.
flashfxp needs to exactly know where it is after each directory change.
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 06-05-2008, 04:22 AM   #3
flashfxp-friend
Junior Member
 
Join Date: May 2008
Posts: 18
Default

But it tells you the current directory right after CWD
example:

[R] CWD /
[R] 250 OK. Current directory is /
[R] PWD
[R] 257 "/" is your current location

[R] CWD access-logs
[R] 250 OK. Current directory is /access-logs
[R] PWD
[R] 257 "/access-logs" is your current location

[R] CWD /not-exist
[R] 550 Can't change directory to /not-exist: No such file or directory

Again, maybe it's not supposed to tell the current directory, and not every server returns it after CWD, but PWD can be disabled for servers that do

Edit:

Yep, seems like not all servers return the current directory after CWD
Lycos for example:

[R] CWD /html
[R] 250 CWD command successful
[R] PWD
[R] 257 "/html" is current directory.

So here I agree that PWD is necessary, but mostly it does not
flashfxp-friend is offline  
Old 06-05-2008, 05:38 AM   #4
DayCuts
Senior Member
FlashFXP Beta Tester
 
Join Date: Dec 2003
Posts: 421
Default

iirc (which i am admittidy not confident of) but the rfc's do not require that a cwd-response return anything useful with the numeric. such data is questionably useless anyway. the numerics themself are only required to indicate the success or failure of the command.

I am not sure of the rfc information regarding pwd, but since a cwd-response only requires the success or failure numerics be returned regardless of where you might end up upon a success, it is logical that a pwd and response should follow a successful cwd command.

Should also note that although many servers provide a little more than success/failure numerics, the fact that it is not a required return means that there is no standard to the response making it unreliable.
DayCuts is offline  
Old 06-05-2008, 06:40 AM   #5
flashfxp-friend
Junior Member
 
Join Date: May 2008
Posts: 18
Default

Yes, and I agree that removing the PWD call completely is wrong
But what I suggest is letting the user an option to do so for particular servers

For example you could add a pre-server option like that:
[v] Server returns current directory with CWD
Format: [_____________________________] (%cd% is the current directory)

And then for this server:
[R] CWD access-logs
[R] 250 OK. Current directory is /access-logs
[R] PWD
[R] 257 "/access-logs" is your current location

I would fill:
[v] Server returns current directory with CWD
Format: ["%cd%" is your current location] (%cd% is the current directory)

Would be very useful
flashfxp-friend is offline  
Closed Thread

Tags
command, directory, flashfxp, pwd, working

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:33 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)