Author: maartenc Date: Wed Feb 10 22:34:40 2010 New Revision: 908693 URL: http://svn.apache.org/viewvc?rev=908693&view=rev Log: FIX: Using SFTP resolver with full pattern URL prevents use of dynamic versions (IVY-1167) (thanks to Gregory Fernandez)
Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=908693&r1=908692&r2=908693&view=diff ============================================================================== --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Wed Feb 10 22:34:40 2010 @@ -34,6 +34,7 @@ Archie Cobbs Flavio Coutinho da Costa Martin Eigenbrodt + Gregory Fernandez Danno Ferrin Benjamin Francisoud Jacob Grydholt Jensen @@ -110,6 +111,7 @@ - IMPROVEMENT: Trace a message when a property file referenced from the settings doesn't exixts (IVY-1074) - IMPROVEMENT: use defaultconf in combination with defaultconfmapping (IVY-1135) (thanks to Jon Schneider) +- FIX: Using SFTP resolver with full pattern URL prevents use of dynamic versions (IVY-1167) (thanks to Gregory Fernandez) - FIX: parent.groupId is not resolved in maven 2 parser (IVY-1169) (thanks to Achim Huegen) - FIX: Creation of symlinks problematic in Windows with Cygwin 1.7 (IVY-1165) - FIX: add ability to programmatically change default resolver (IVY-1163) (thanks to Jason Trump) Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java?rev=908693&r1=908692&r2=908693&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java Wed Feb 10 22:34:40 2010 @@ -202,10 +202,11 @@ public List list(String parent) throws IOException { try { ChannelSftp c = getSftpChannel(parent); - Collection r = c.ls(parent); + String path = getPath(parent); + Collection r = c.ls(path); if (r != null) { - if (!parent.endsWith("/")) { - parent = parent + "/"; + if (!path.endsWith("/")) { + path = parent + "/"; } List result = new ArrayList(); for (Iterator iter = r.iterator(); iter.hasNext();) { @@ -215,7 +216,7 @@ if (".".equals(entry.getFilename()) || "..".equals(entry.getFilename())) { continue; } - result.add(parent + entry.getFilename()); + result.add(path + entry.getFilename()); } } return result; @@ -224,7 +225,11 @@ IOException ex = new IOException("Failed to return a listing for '" + parent + "'"); ex.initCause(e); throw ex; - } + } catch (URISyntaxException usex) { + IOException ex = new IOException("Failed to return a listing for '" + parent + "'"); + ex.initCause(usex); + throw ex; + } return null; }