fix GetFolderByPath to support root folder path
This commit is contained in:
parent
808354e969
commit
749e11762f
|
@ -88,6 +88,7 @@ namespace Oqtane.Controllers
|
||||||
public Folder GetByPath(int siteId, string path)
|
public Folder GetByPath(int siteId, string path)
|
||||||
{
|
{
|
||||||
var folderPath = WebUtility.UrlDecode(path).Replace("\\", "/");
|
var folderPath = WebUtility.UrlDecode(path).Replace("\\", "/");
|
||||||
|
folderPath = (folderPath == "/") ? "" : folderPath;
|
||||||
if (!folderPath.EndsWith("/") && folderPath != "")
|
if (!folderPath.EndsWith("/") && folderPath != "")
|
||||||
{
|
{
|
||||||
folderPath += "/";
|
folderPath += "/";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user