Closed nddipiazza closed 3 years ago
I've tried adding a reproduction testcase in #605, but at least there I do not get a null
filename. Can you have a look to see what I'm missing?
Yeah I figured it out. Like I said this bug was introduced here https://github.com/hierynomus/smbj/commit/f6997d3f0105ed6dcc3c06c4259187c5c358d0e5
This used to give you a fileName that was the full UNC path:
How it has been changed to return the relative path:
We should probably go back to UNC path
public String getFileName() {
return name.toUncPath();
}
Then if they want the Path they can use the SmbPath.parse()
to get it. Or we can add a convenience method.
Thanks for the fix!
On 0.10.1-SNAPSHOT we are getting a null filename from the Folder and File objects
Please check out this branch:
https://github.com/nddipiazza/smbj/tree/issue_603 / https://github.com/hierynomus/smbj/compare/master...nddipiazza:issue_603
And run it against any windows share:
returns a null for filename
result.getFileName()
when-enableDFS
is enabled, and empty string when-enableDFS
is not enabled.Instead it should have been set to the share smbpath:
\\192.168.1.51\share
regardless ifenableDfs
was true or false.0.10.0 does NOT have this issue.
This bug was introduced here:
https://github.com/hierynomus/smbj/pull/350 / https://github.com/hierynomus/smbj/commit/f6997d3f0105ed6dcc3c06c4259187c5c358d0e5