Menu

#2 Fix for stupid windows servers.

open
nobody
None
5
2004-08-31
2004-08-31
Anonymous
No

I discovered a server that uses the backward slash \ as
path separator. That causes a lot of problems. I solved
it easyly by replacing this with the forward slash / in
the source of FTP.java:

public String pwd() throws IOException {
[...]
directory = replyline.substring(
replyline.indexOf('\"') + 1,
replyline.lastIndexOf('\"'))
.replace('\\', '/');
[...]
}

I'm not sure, if that is the best way (because I didn't
take a deeper look at the code) but it fixed all of my
problems with this server (a Windows NT box).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.