diff options
| author | Michael VanOverbeek <[email protected]> | 2017-03-07 13:14:07 +0000 |
|---|---|---|
| committer | Michael VanOverbeek <[email protected]> | 2017-03-07 13:14:07 +0000 |
| commit | 01530d637d790a101ea4dcb0e183664420d98ff9 (patch) | |
| tree | 50e9ccfcefe0e6c53a6cd1648f21a38f413a2295 /ShiftOS.Objects | |
| parent | bf3dbc26a5579e9c2134435d272aafe857ffd1d1 (diff) | |
| download | shiftos_thereturn-01530d637d790a101ea4dcb0e183664420d98ff9.tar.gz shiftos_thereturn-01530d637d790a101ea4dcb0e183664420d98ff9.tar.bz2 shiftos_thereturn-01530d637d790a101ea4dcb0e183664420d98ff9.zip | |
Fix NPC generation
Diffstat (limited to 'ShiftOS.Objects')
| -rw-r--r-- | ShiftOS.Objects/ShiftFS.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ShiftOS.Objects/ShiftFS.cs b/ShiftOS.Objects/ShiftFS.cs index e14c2a8..2c6b28b 100644 --- a/ShiftOS.Objects/ShiftFS.cs +++ b/ShiftOS.Objects/ShiftFS.cs @@ -291,10 +291,13 @@ namespace ShiftOS.Objects.ShiftFS { string[] pathlist = path.Split('/'); int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + if (Mounts[vol] == null) + Mounts[vol] = new Directory(); var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 1; i++) { - dir = dir.FindDirectoryByName(pathlist[i]); + dir = dir?.FindDirectoryByName(pathlist[i]); } return dir != null; |
