diff options
| author | pfg <[email protected]> | 2017-03-07 17:33:44 -0800 |
|---|---|---|
| committer | pfg <[email protected]> | 2017-03-07 17:33:44 -0800 |
| commit | b20d77edd1227b2ce53b65b0752972bd65a36e84 (patch) | |
| tree | b15615591e009c9aa472ba5d95374a064c50e8b1 /ShiftOS.Objects/ShiftFS.cs | |
| parent | 4989356d6797335b44060ae94c9af34404773506 (diff) | |
| parent | 449d43d22c1d12ce6aa0243fbb4ea94481ff8f4c (diff) | |
| download | shiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.tar.gz shiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.tar.bz2 shiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.zip | |
Merge branch 'master' of https://github.com/shiftos-game/ShiftOS
Diffstat (limited to 'ShiftOS.Objects/ShiftFS.cs')
| -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; |
