diff --git a/Start-FileBrowser.ps1 b/Start-FileBrowser.ps1 index cd6b447..9cdd2dd 100644 --- a/Start-FileBrowser.ps1 +++ b/Start-FileBrowser.ps1 @@ -124,6 +124,7 @@ begin "recaptcha": null } }' + $app_dir = Join-Path $env:PROGRAMDATA 'filebrowser' if(-not (Test-Path $app_dir -PathType Container)) { @@ -142,12 +143,14 @@ begin } } + if(-not (Test-Path $filebrowser_exe -PathType Leaf)) + { + throw "filebrowser.exe is missing" + } + Set-Alias 'filebrowser' $filebrowser_exe $config_path = Join-Path $app_dir 'config.json' - # if(-not (Test-Path $config_path -PathType Leaf)) - # { $config_json > $config_path - # } $db_path = Join-Path $app_dir "filebrowser.db" if(Test-Path $db_path -PathType Leaf)