DirectorySeparator issue when black or forward slash.
Tested on Apple mac and Windows
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
@ -37,11 +37,11 @@ namespace Oqtane.Services
|
||||
{
|
||||
if (!(folderPath.EndsWith(System.IO.Path.DirectorySeparatorChar) || folderPath.EndsWith(System.IO.Path.AltDirectorySeparatorChar)))
|
||||
{
|
||||
folderPath = Utilities.PathCombine(folderPath,"\\");
|
||||
folderPath = Utilities.PathCombine(folderPath, System.IO.Path.DirectorySeparatorChar.ToString());
|
||||
}
|
||||
|
||||
|
||||
var path = WebUtility.UrlEncode(folderPath);
|
||||
|
||||
|
||||
return await GetJsonAsync<List<File>>($"{Apiurl}/{siteId}/{path}");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
@ -37,11 +37,11 @@ namespace Oqtane.Services
|
||||
{
|
||||
if (!(folderPath.EndsWith(System.IO.Path.DirectorySeparatorChar) || folderPath.EndsWith(System.IO.Path.AltDirectorySeparatorChar)))
|
||||
{
|
||||
folderPath = Utilities.PathCombine(folderPath, "\\");
|
||||
folderPath = Utilities.PathCombine(folderPath, System.IO.Path.DirectorySeparatorChar.ToString());
|
||||
}
|
||||
|
||||
|
||||
var path = WebUtility.UrlEncode(folderPath);
|
||||
|
||||
|
||||
return await GetJsonAsync<Folder>($"{ApiUrl}/{siteId}/{path}");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user