You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a little problem with the implementation CifsFile.getParentFile().
The contract in the interface OverthereFile says:
@return the parent of this file or <code>null</code> if this file does not have a parent file.
But with a SMB File, the method CifsFile.getParentFile() doesn't return null for a root path (like \\host\$C).
The path of the SmbFile returned is \\host, smbFile.getParent() doesn't throw a MalformedURLException.
Call next the method CifsFile.getPath() on such SmbFile throws the following exception:
java.lang.IllegalArgumentException: UNC path '\\EVE-WIN8' did not match expected expression '\\\\[^\\]+\\([^\\]+(?:\\.*)?)'
at com.xebialabs.overthere.cifs.PathEncoder.fromUncPath(PathEncoder.java:113)
at com.xebialabs.overthere.cifs.CifsFile.getPath(CifsFile.java:58)
at com.xebialabs.overthere.cifs.CifsFile.toString(CifsFile.java:398)
To workaround this issue, I've patched the method CifsFile.getParentFile() like that:
Sorry but I met a problem with this fix, the method smbFile.getParent() returns a smb URL (like: smb://host/C$/folder), it isn't an UNC path thus the test with PathEncoder.isValidUncPath is always false.
Hi,
I have a little problem with the implementation
CifsFile.getParentFile()
.The contract in the interface
OverthereFile
says:But with a SMB File, the method
CifsFile.getParentFile()
doesn't returnnull
for a root path (like\\host\$C
).The path of the SmbFile returned is
\\host
,smbFile.getParent()
doesn't throw aMalformedURLException
.Call next the method
CifsFile.getPath()
on such SmbFile throws the following exception:To workaround this issue, I've patched the method
CifsFile.getParentFile()
like that:Regards,
Eric
The text was updated successfully, but these errors were encountered: