diff --git a/SIL.WritingSystems.Tests/SldrTests.cs b/SIL.WritingSystems.Tests/SldrTests.cs index 6c75407b6..62b91d22d 100644 --- a/SIL.WritingSystems.Tests/SldrTests.cs +++ b/SIL.WritingSystems.Tests/SldrTests.cs @@ -60,8 +60,9 @@ public void Dispose() Sldr.Cleanup(); // clear out SLDR cache var di = new DirectoryInfo(sldrCachePath); - foreach (var fi in di.GetFiles()) - fi.Delete(); + if (di.Exists) + foreach (var fi in di.GetFiles()) + fi.Delete(); // The OfflineSldrAttribute has been assigned to the entire test assembly, so we reinitialize // the SLDR back to what it was Sldr.Initialize(true, sldrCachePath);