Index: SFTPRepository.java =================================================================== --- SFTPRepository.java (révision 907427) +++ SFTPRepository.java (copie de travail) @@ -202,10 +202,12 @@ public List list(String parent) throws IOException { try { ChannelSftp c = getSftpChannel(parent); - Collection r = c.ls(parent); + URI uri = new URI(parent); + String path = uri.getPath(); + 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 +217,7 @@ if (".".equals(entry.getFilename()) || "..".equals(entry.getFilename())) { continue; } - result.add(parent + entry.getFilename()); + result.add(path + entry.getFilename()); } } return result; @@ -224,7 +226,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; }