Regression in 3.4.2 (build 197) with '~ ' at begging of directory name

Advertisement

joelhock
Joined:
Posts:
1

Regression in 3.4.2 (build 197) with '~ ' at begging of directory name

This worked fine with WinSCP 3.3, but is broken in 3.4.2:

If a directory begins with a tilde and space (e.g. ~ upload), then trying to descend into that directory will just take the use to their home directory.

I'm using SSH version 2, SCP protocol, compression and 3DES encryption. Here is part of the logfile that shows the problem (note that the directory I end up in is /home/joel, not the ~ upload directory).
Directory content loaded from cache.
Changing directory to "~ upload".
cd ~ upload ; echo "WinSCP: this is end-of-file:$?"
WinSCP: this is end-of-file:0
Getting current directory name.
pwd ; echo "WinSCP: this is end-of-file:$?"
/home/joel
WinSCP: this is end-of-file:0
Directory content loaded from cache.
Thanks for your wonderful program – it totally rocks!

Joel

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: regression in 3.4.2 (build 197) with '~ ' at beggin of directory name

The problem was caused by fact that since 3.4.2, WinSCP down not add quotes around paths that begin with ~, to allow processing paths like ~prikryl (e.g. to open home directory of user prikryl). I may override this behaviour when second character is space, but I'm not sure, if this solves all possible cases. What do you think?

Reply with quote

Advertisement

You can post new topics in this forum