Check folder exist before trying to delete (#14249)
Co-authored-by: Zeegaan <nge@umbraco.dk>
This commit is contained in:
@@ -22,6 +22,11 @@ public class ResetCache : MigrationBase
|
||||
|
||||
private void DeleteAllFilesInFolder(string path)
|
||||
{
|
||||
if (Directory.Exists(path) == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var directoryInfo = new DirectoryInfo(path);
|
||||
|
||||
foreach (FileInfo file in directoryInfo.GetFiles())
|
||||
|
||||
Reference in New Issue
Block a user