[ENHANCE] - #3057 FileManager when ShowFolders = false however a Folder is set by path
This commit is contained in:
parent
4d63c6266c
commit
3e8eb9abb5
|
@ -168,6 +168,21 @@
|
||||||
ShowSuccess = true;
|
ShowSuccess = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(Folder) && Folder != Constants.PackagesFolder)
|
||||||
|
{
|
||||||
|
Folder folder = await FolderService.GetFolderAsync(ModuleState.SiteId, Folder);
|
||||||
|
if (folder != null)
|
||||||
|
{
|
||||||
|
FolderId = folder.FolderId;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FolderId = -1;
|
||||||
|
_message = "Folder Path " + Folder + "Does Not Exist";
|
||||||
|
_messagetype = MessageType.Error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ShowFolders)
|
if (ShowFolders)
|
||||||
{
|
{
|
||||||
_folders = await FolderService.GetFoldersAsync(ModuleState.SiteId);
|
_folders = await FolderService.GetFoldersAsync(ModuleState.SiteId);
|
||||||
|
@ -184,21 +199,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Folder) && Folder != Constants.PackagesFolder)
|
|
||||||
{
|
|
||||||
Folder folder = await FolderService.GetFolderAsync(ModuleState.SiteId, Folder);
|
|
||||||
if (folder != null)
|
|
||||||
{
|
|
||||||
FolderId = folder.FolderId;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FolderId = -1;
|
|
||||||
_message = "Folder Path " + Folder + "Does Not Exist";
|
|
||||||
_messagetype = MessageType.Error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FileId != -1)
|
if (FileId != -1)
|
||||||
{
|
{
|
||||||
File file = await FileService.GetFileAsync(FileId);
|
File file = await FileService.GetFileAsync(FileId);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user