mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-27 14:40:28 +00:00
Merge remote-tracking branch
'origin/GP-1696_dev747368_fix_unc_path_handling' into patch (Closes #3912)
This commit is contained in:
commit
c3c20d9e0f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user