OS independent file paths
This commit is contained in:
@ -38,9 +38,9 @@ namespace Oqtane.Services
|
||||
|
||||
public async Task<Folder> GetFolderAsync(int siteId, [NotNull] string folderPath)
|
||||
{
|
||||
if (!folderPath.EndsWith("\\"))
|
||||
if (!(folderPath.EndsWith(System.IO.Path.DirectorySeparatorChar) || folderPath.EndsWith(System.IO.Path.AltDirectorySeparatorChar)))
|
||||
{
|
||||
folderPath += "\\";
|
||||
folderPath = System.IO.Path.Combine(folderPath, " ").TrimEnd(' ');
|
||||
}
|
||||
|
||||
var path = WebUtility.UrlEncode(folderPath);
|
||||
|
Reference in New Issue
Block a user