OS independent file paths & Utility.PathCombine added
System.IO.Path.Combine provides cross-platform support for system paths, however rooted paths discarding of earlier segments Utilities.PathCombine ensures if any parameters start with root chacters does not discard previous Utilities.PathCombine allows appending of "\\" to translate to the correct cross-platform result
This commit is contained in:
@ -387,14 +387,14 @@ namespace Oqtane.Infrastructure
|
||||
}
|
||||
|
||||
// add folder for user
|
||||
var folder = folderRepository.GetFolder(user.SiteId, "Users");
|
||||
var folder = folderRepository.GetFolder(user.SiteId, Utilities.PathCombine("Users","\\"));
|
||||
if (folder != null)
|
||||
folderRepository.AddFolder(new Folder
|
||||
{
|
||||
SiteId = folder.SiteId,
|
||||
ParentId = folder.FolderId,
|
||||
Name = "My Folder",
|
||||
Path = Path.Combine(folder.Path, newUser.UserId.ToString()),
|
||||
Path = Utilities.PathCombine(folder.Path, newUser.UserId.ToString(),"\\"),
|
||||
Order = 1,
|
||||
IsSystem = true,
|
||||
Permissions = new List<Permission>
|
||||
|
Reference in New Issue
Block a user