ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rami Ojares" <rami.oja...@elisa.fi>
Subject SSH RemoteUri bug
Date Thu, 08 Apr 2004 09:18:28 GMT
Hi,

isRemoteUri() method in Scp.java is seriously flawed.

private boolean isRemoteUri(String uri) {
    boolean isRemote = true;
    int indexOfAt = uri.indexOf('@');
    if (indexOfAt < 0) {
        isRemote = false;
    }
    return isRemote;
}

A local file path can very well on windows and unix have @ character.
I do not think if one can tell apart local and remote file.
Therefore I propose that for Scp there should be 
for example remoteFile and localFile attributes instead of file.
Also there should be toRemoteDir and toLocalDir instead of
toDir.

Other option would be to use always URL:s with protocols but
that is very inconvenient in case of local files.

This is a show stopper for people using @ in their paths (I am one of them,
and there is nothing wrong with that :)

- rami



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message