Hello,
I’m relatively new to this, so apologies if I’ve missed something obvious.

I’ve been working with Mina SSHD in a project and have been implementing 
various nio filesystems.
I can’t tell if there is an issue here or not, however, it may be one 
restricted to Windows.  I haven’t yet been able to check Linux.

I noted that a change - [SSHD-842] Remove some older API(s) that were using 
java.io.File instead of java.nio.file.Path
Obviously moved more parts to use the nio code, but I ran into difficulty, 
where org.apache.sshd.common.util.io.IoUtils.java#getPermissions
uses a file object if the views don’t contain the POSIX attribute.  This makes 
sense in some regard, but unless I introduced the problem, I had a go at making 
this use Path instead.

What I have found is that if I set up a filesystem using nio, even just the 
default disk, I am unable to remove/delete files.  It has a good go, there are 
no errors, but if you list the directory, it finds the file, put has no 
permissions for it.

As far as I can see, this could be related to memory-mapped files (if this is 
used) – or at least something to do with file handles still being held open in 
some way.  This is why I think it may only be an issue on Windows, and wondered 
if anyone else could have seen this or if that is why it has been missed 
(unless of course I managed to introduce the error).

I’m attempting to pull everything out of our project and simplify it to see 
what could be happening, but I’m not that experienced with it all so could take 
some time.

I thought I would see if anyone understands what I’m seeing and if they have 
any ideas.  Of course, I’ll try to help out where I can – and of course, let me 
know if I have missed something obvious and shouldn’t be using it like this.

Regards,
Adam.

Reply via email to