Fix #4223
This commit is contained in:
parent
d520c3d674
commit
332e528012
|
@ -760,23 +760,13 @@ namespace Oqtane.Controllers
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(folderpath))
|
if (!Directory.Exists(folderpath))
|
||||||
{
|
{
|
||||||
string path = "";
|
try
|
||||||
var separators = new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
|
|
||||||
string[] folders = folderpath.Split(separators, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
foreach (string folder in folders)
|
|
||||||
{
|
{
|
||||||
path = Utilities.PathCombine(path, folder, Path.DirectorySeparatorChar.ToString());
|
Directory.CreateDirectory(folderpath);
|
||||||
if (!Directory.Exists(path))
|
}
|
||||||
{
|
catch (Exception ex)
|
||||||
try
|
{
|
||||||
{
|
_logger.Log(LogLevel.Error, this, LogFunction.Create, ex, "Unable To Create Folder {Folder}", folderpath);
|
||||||
Directory.CreateDirectory(path);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.Log(LogLevel.Error, this, LogFunction.Create, ex, "Unable To Create Folder {Folder}", path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user