Skip to content

Commit

Permalink
[Fix] - #3057 FileManager when ShowFolders = false however a Folder i…
Browse files Browse the repository at this point in the history
…s set by path
  • Loading branch information
vnetonline committed Jul 23, 2023
1 parent 4d63c62 commit 1319432
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Oqtane.Client/Modules/Controls/FileManager.razor
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@
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)
{
_folders = await FolderService.GetFoldersAsync(ModuleState.SiteId);
Expand All @@ -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)
{
File file = await FileService.GetFileAsync(FileId);
Expand Down

0 comments on commit 1319432

Please sign in to comment.