You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Nadezhda Balkandzhiyska (Jira)" <ji...@apache.org> on 2022/05/12 14:06:00 UTC

[jira] [Comment Edited] (SSHD-1267) Apache Mina SFTP 2.8.0 Upgrade

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

Nadezhda Balkandzhiyska edited comment on SSHD-1267 at 5/12/22 2:05 PM:
------------------------------------------------------------------------

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: **
{code:java}
public Path resolveLocalFilePath(SftpSubsystemProxy subsystem, Path rootDir, String remotePath) throws InvalidPathException {
    rootDir.resolve("/")
    }{code}
But when creating the file system provider root directory(rootDir) is set to WindowsPath, which automatically transfers the path to "C: \".

 

The main idea is that I want the file system regardless of the operating system to be the following:

 
{code:java}
/
somefolder
somefolder
{code}
 

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


was (Author: JIRAUSER289318):
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: **
{code:java}
public Path resolveLocalFilePath(SftpSubsystemProxy subsystem, Path rootDir, String remotePath) throws InvalidPathException {
    rootDir.resolve("/")
    }{code}
But when creating the file system provider root directory(rootDir) is set to WindowsPath, which automatically transfers the path to "C: \".

 

The main idea is that I want the file system regardless of the operating system to be the following:

 
{code:java}
/
somefolder
somefolder
{code}
 

 

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: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org