"Local" command line parameter is only for stopping

a server that has been started by the desktop GUI
This commit is contained in:
grossmj
2022-03-30 18:38:34 +08:00
parent 8975f63e2f
commit 900d4f79ee
18 changed files with 138 additions and 186 deletions

View File

@ -60,8 +60,7 @@ def check_path_allowed(path: str):
if len(os.path.commonprefix([project_directory, path])) == len(project_directory):
return
if Config.instance().settings.Server.local is False:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="The path is not allowed")
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=f"The path {path} is not allowed")
def get_mountpoint(path: str):