[ 
https://issues.apache.org/jira/browse/SSHD-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17535969#comment-17535969
 ] 

Nadezhda Balkandzhiyska commented on SSHD-1267:
-----------------------------------------------

Thanks both for the provided information.


I've actually read the documentation a few times and I've almost deprecated my 
code, but I'm still trying to restore the old behavior with the new library.

The main problem is that before there was no file dependency, and now when 
creating Path object by default takes Windows file system. I tried, through 
extend the SftpFileSystemAccessor to redirect the remote directory to the Unix 
root directory with the following code:

    *public Path resolveLocalFilePath(SftpSubsystemProxy subsystem, Path 
rootDir, String remotePath) throws InvalidPathException {*
    *rootDir.resolve("/")*
    *}*

But when creating the file system provider root directory(rootDir) is set to 
WindowsPath, which automatically transfers the path to "C: \".

 

Maybe the main thing that bothers me is whether it is possible to avoid this 
file dependency with the new library?

> Apache Mina SFTP 2.8.0 Upgrade
> ------------------------------
>
>                 Key: SSHD-1267
>                 URL: https://issues.apache.org/jira/browse/SSHD-1267
>             Project: MINA SSHD
>          Issue Type: Question
>    Affects Versions: 0.11.0, 0.14.0, 2.8.0
>            Reporter: Nadezhda Balkandzhiyska
>            Priority: Major
>
> I am trying to upgrade 0.14.0 sshd-core and 0.11.0 sshd-sftp to 2.8.0 version.
> Unfortunately I found that there are a lot of implementation changes, but I 
> did not find a migration guide before version 2.0.0 (It would be great if 
> someone could provide me with a migration guide from 0.11.0/0.14.0 to 2.0.0)
> The main problem I have is the lack of FileSystemView and SshFile since the 
> previous version has file system independence and we use the ability for the 
> root sub-directory of both Windows and Unix to be '/'.
> Now, when I try to run sftp server on Windows the Windows file system always 
> redirects me to 'C:\'.
> I would be extremely grateful for some ideas on how I can migrate to the new 
> version given the file system problem.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to