aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Objects/ShiftFS.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Objects/ShiftFS.cs')
-rw-r--r--ShiftOS.Objects/ShiftFS.cs5
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;