lgoldstein commented on a change in pull request #89: [SSHD-893] Fix SCP download with pattern issue in rooted filesystem URL: https://github.com/apache/mina-sshd/pull/89#discussion_r255840920
########## File path: sshd-common/src/main/java/org/apache/sshd/common/util/io/DirectoryScanner.java ########## @@ -115,49 +126,37 @@ * @author <a href="mailto:[email protected]">Antoine Levy-Lambert</a> */ public class DirectoryScanner { - /** * The base directory to be scanned. */ - protected File basedir; + private Path basedir; /** * The patterns for the files to be included. */ - protected String[] includes; - - /** - * The files which matched at least one include and no excludes - * and were selected. - */ - protected List<String> filesIncluded; + private List<String> includePatterns; /** - * Whether or not the file system should be treated as a case sensitive - * one. + * Whether or not the file system should be treated as + * a case sensitive one. */ - protected boolean isCaseSensitive = true; + private boolean caseSensitive = OsUtils.isUNIX(); Review comment: I mean override `ScpFileOpener` and implement `ScpFileOpener#getMatchingFilesToSend` using a `DirectoryScanner` with some other case-sensitivity (NOTE: `DirectoryScanner#setCaseSensitivity` is available to override the default). This can be easily done when initializing the SCP client/server by setting a default `ScpFileOpener` when they are configured - thus no need to override the opener on each session. ---------------------------------------------------------------- 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
