mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 00:00:54 +03:00
MkDirs no longer tries to create folders twice when path has trailing slash.
This commit is contained in:
@@ -90,6 +90,7 @@ public class SFTPClient
|
||||
public void mkdirs(String path)
|
||||
throws IOException {
|
||||
final Deque<String> dirsToMake = new LinkedList<String>();
|
||||
path = PathComponents.trimTrailingSeparator(path, engine.getPathHelper().getPathSeparator());
|
||||
for (PathComponents current = engine.getPathHelper().getComponents(path); ;
|
||||
current = engine.getPathHelper().getComponents(current.getParent())) {
|
||||
final FileAttributes attrs = statExistence(current.getPath());
|
||||
|
||||
Reference in New Issue
Block a user