diff --git a/frontend/src/Components/FileBrowser/FileBrowserModalContent.tsx b/frontend/src/Components/FileBrowser/FileBrowserModalContent.tsx index aaaf9b4e0..1f02f0145 100644 --- a/frontend/src/Components/FileBrowser/FileBrowserModalContent.tsx +++ b/frontend/src/Components/FileBrowser/FileBrowserModalContent.tsx @@ -133,7 +133,11 @@ function FileBrowserModalContent({ className={styles.scroller} scrollDirection="both" > - {error ?
{translate('ErrorLoadingContents')}
: null} + {error ? ( + + {translate('ErrorLoadingContents')} + + ) : null} {isFetched && !error ? ( diff --git a/frontend/src/Path/usePaths.ts b/frontend/src/Path/usePaths.ts index 72bef1cb6..b7a76b486 100644 --- a/frontend/src/Path/usePaths.ts +++ b/frontend/src/Path/usePaths.ts @@ -47,7 +47,6 @@ const usePaths = ({ path: '/filesystem', queryParams: { path, allowFoldersWithoutTrailingSlashes, includeFiles }, queryOptions: { - enabled: path.trim().length > 0, placeholderData: keepPreviousData, }, }); diff --git a/src/Sonarr.Api.V5/FileSystem/FileSystemController.cs b/src/Sonarr.Api.V5/FileSystem/FileSystemController.cs index 2c52ca800..ad54be2f7 100644 --- a/src/Sonarr.Api.V5/FileSystem/FileSystemController.cs +++ b/src/Sonarr.Api.V5/FileSystem/FileSystemController.cs @@ -24,7 +24,7 @@ public FileSystemController(IFileSystemLookupService fileSystemLookupService, [HttpGet] [Produces("application/json")] - public IActionResult GetContents(string path, bool includeFiles = false, bool allowFoldersWithoutTrailingSlashes = false) + public IActionResult GetContents(string? path, bool includeFiles = false, bool allowFoldersWithoutTrailingSlashes = false) { return Ok(_fileSystemLookupService.LookupContents(path, includeFiles, allowFoldersWithoutTrailingSlashes)); }