[ 
https://issues.apache.org/jira/browse/DIRMINA-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

lucas theisen updated DIRMINA-974:
----------------------------------

    Description: 
The readAttributes method is hard coded to ask for unix attribute set:

[code:java]
        Map<String, Object> a = Files.readAttributes(
                file.toPath(),
                
"unix:size,uid,owner,gid,group,isDirectory,isRegularFile,isSymbolicLink,permissions,creationTime,lastModifiedTime,lastAccessTime",
                followLinks ? new LinkOption[0] : new LinkOption[] { 
LinkOption.NOFOLLOW_LINKS });
[code]

This causes a build failure on windows:

[code]
java.lang.UnsupportedOperationException: View 'unix' not available
        at 
sun.nio.fs.AbstractFileSystemProvider.readAttributes(AbstractFileSystemProvider.java:91)
        at java.nio.file.Files.readAttributes(Files.java:1902)
        at 
org.apache.sshd.common.file.nativefs.NativeSshFileNio.getAttributes(NativeSshFileNio.java:58)
        at 
org.apache.sshd.server.sftp.SftpSubsystem.writeAttrs(SftpSubsystem.java:972)
        at 
org.apache.sshd.server.sftp.SftpSubsystem.sendAttrs(SftpSubsystem.java:790)
        at 
org.apache.sshd.server.sftp.SftpSubsystem.process(SftpSubsystem.java:526)
        at org.apache.sshd.server.sftp.SftpSubsystem.run(SftpSubsystem.java:334)
        at java.lang.Thread.run(Thread.java:722)
[code]

  was:
The readAttributes method is hard coded to ask for unix attribute set:

[code:java]
        Map<String, Object> a = Files.readAttributes(
                file.toPath(),
                
"unix:size,uid,owner,gid,group,isDirectory,isRegularFile,isSymbolicLink,permissions,creationTime,lastModifiedTime,lastAccessTime",
                followLinks ? new LinkOption[0] : new LinkOption[] { 
LinkOption.NOFOLLOW_LINKS });
[/code]

This causes a build failure on windows:

[code]
java.lang.UnsupportedOperationException: View 'unix' not available
        at 
sun.nio.fs.AbstractFileSystemProvider.readAttributes(AbstractFileSystemProvider.java:91)
        at java.nio.file.Files.readAttributes(Files.java:1902)
        at 
org.apache.sshd.common.file.nativefs.NativeSshFileNio.getAttributes(NativeSshFileNio.java:58)
        at 
org.apache.sshd.server.sftp.SftpSubsystem.writeAttrs(SftpSubsystem.java:972)
        at 
org.apache.sshd.server.sftp.SftpSubsystem.sendAttrs(SftpSubsystem.java:790)
        at 
org.apache.sshd.server.sftp.SftpSubsystem.process(SftpSubsystem.java:526)
        at org.apache.sshd.server.sftp.SftpSubsystem.run(SftpSubsystem.java:334)
        at java.lang.Thread.run(Thread.java:722)
[/code]


> NativeSshFileNio assumes unix filesytem
> ---------------------------------------
>
>                 Key: DIRMINA-974
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-974
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 0.9.0
>         Environment: Windows
>            Reporter: lucas theisen
>
> The readAttributes method is hard coded to ask for unix attribute set:
> [code:java]
>         Map<String, Object> a = Files.readAttributes(
>                 file.toPath(),
>                 
> "unix:size,uid,owner,gid,group,isDirectory,isRegularFile,isSymbolicLink,permissions,creationTime,lastModifiedTime,lastAccessTime",
>                 followLinks ? new LinkOption[0] : new LinkOption[] { 
> LinkOption.NOFOLLOW_LINKS });
> [code]
> This causes a build failure on windows:
> [code]
> java.lang.UnsupportedOperationException: View 'unix' not available
>       at 
> sun.nio.fs.AbstractFileSystemProvider.readAttributes(AbstractFileSystemProvider.java:91)
>       at java.nio.file.Files.readAttributes(Files.java:1902)
>       at 
> org.apache.sshd.common.file.nativefs.NativeSshFileNio.getAttributes(NativeSshFileNio.java:58)
>       at 
> org.apache.sshd.server.sftp.SftpSubsystem.writeAttrs(SftpSubsystem.java:972)
>       at 
> org.apache.sshd.server.sftp.SftpSubsystem.sendAttrs(SftpSubsystem.java:790)
>       at 
> org.apache.sshd.server.sftp.SftpSubsystem.process(SftpSubsystem.java:526)
>       at org.apache.sshd.server.sftp.SftpSubsystem.run(SftpSubsystem.java:334)
>       at java.lang.Thread.run(Thread.java:722)
> [code]



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to