The-Yoda commented on a change in pull request #88: Fix download with pattern 
issue in rooted filesystem
URL: https://github.com/apache/mina-sshd/pull/88#discussion_r255477684
 
 

 ##########
 File path: sshd-scp/src/main/java/org/apache/sshd/common/scp/ScpHelper.java
 ##########
 @@ -401,9 +401,11 @@ public void send(Collection<String> paths, boolean 
recursive, boolean preserve,
                 }
 
                 Session session = getSession();
-                Iterable<String> included = 
opener.getMatchingFilesToSend(session, basedir, pattern);
+                Path basePath = resolveLocalPath(basedir);
+                Iterable<String> included = 
opener.getMatchingFilesToSend(session, basePath.toFile().getAbsolutePath(), 
pattern);
+
                 for (String path : included) {
 
 Review comment:
   `basePath.toAbsolutePath().toString()` won't give absolute path of the file 
when the underlying filesystem is virtual filesystem. I couldn't find any other 
cleaner way other than `toFile`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to