From bf3dbc26a5579e9c2134435d272aafe857ffd1d1 Mon Sep 17 00:00:00 2001 From: Michael VanOverbeek Date: Tue, 7 Mar 2017 01:09:53 +0000 Subject: [PATCH] the mud called me a drunk --- ShiftOS.Server/RandomUserGenerator.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ShiftOS.Server/RandomUserGenerator.cs b/ShiftOS.Server/RandomUserGenerator.cs index afaee46..8c1e430 100644 --- a/ShiftOS.Server/RandomUserGenerator.cs +++ b/ShiftOS.Server/RandomUserGenerator.cs @@ -214,12 +214,18 @@ namespace ShiftOS.Server targets = new Dictionary(); foreach(var dir in dirs) { - string sDir = dir.Replace("\\", "/"); - while (!sDir.StartsWith("shiftnet/")) + if (!string.IsNullOrWhiteSpace(dir)) { - sDir = sDir.Remove(0, 1); + string sDir = dir.Replace("\\", "/"); + if (sDir.Contains("shiftnet")) + { + while (!sDir.StartsWith("shiftnet/")) + { + sDir = sDir.Remove(0, 1); + } + targets.Add(dir, output + "/" + sDir); + } } - targets.Add(dir, output + "/" + sDir); } }