fix #3072 - add error handling and logging to folder creation logic

This commit is contained in:
sbwalker 2023-08-03 14:45:27 -04:00
parent 93be61e483
commit 4483901270

View File

@ -677,7 +677,14 @@ namespace Oqtane.Controllers
path = Utilities.PathCombine(path, folder, Path.DirectorySeparatorChar.ToString());
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
try
{
Directory.CreateDirectory(path);
}
catch (Exception ex)
{
_logger.Log(LogLevel.Error, this, LogFunction.Create, ex, "Unable To Create Folder {Folder}", path);
}
}
}
}