Merge remote-tracking branch

'origin/GP-1696_dev747368_fix_unc_path_handling' into patch (Closes
#3912)
This commit is contained in:
ghidra1 2022-01-26 15:58:06 -05:00
commit c3c20d9e0f

View File

@ -76,6 +76,12 @@ public class GFileImpl implements GFile {
public static GFileImpl fromPathString(GFileSystem fileSystem, GFile parent, String path,
FSRL fsrl, boolean isDirectory, long length) {
String[] split = path.split(FSUtilities.SEPARATOR);
if (split.length >= 3 && split[0].isEmpty() && split[1].isEmpty() && !split[2].isEmpty()) {
// The path was in UNC format, either //unc or \\unc.
// Put a unc prefix "//" back into the element that has the unc name. The leading empty
// elements will be skipped when building the parentage.
split[2] = "//" + split[2];
}
for (int i = 0; i < split.length - 1; ++i) {
if (split[i].length() == 0) {
continue;