Merge pull request #3103 from sbwalker/dev

fix GetFolderByPath to support root folder path
This commit is contained in:
Shaun Walker 2023-08-03 17:29:26 -04:00 committed by GitHub
commit 6a57fcc04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,6 +88,7 @@ namespace Oqtane.Controllers
public Folder GetByPath(int siteId, string path)
{
var folderPath = WebUtility.UrlDecode(path).Replace("\\", "/");
folderPath = (folderPath == "/") ? "" : folderPath;
if (!folderPath.EndsWith("/") && folderPath != "")
{
folderPath += "/";