File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1013,12 +1013,12 @@ async def list_files(request: Request):
10131013
10141014 if not os .path .exists (full_path ):
10151015 # if user just removed a folder, prevent server error 500 in UI
1016- return []
1016+ return JSONResponse ( content = [])
10171017
10181018 try :
10191019 # Check if the directory exists
10201020 if not os .path .exists (full_path ) or not os .path .isdir (full_path ):
1021- return []
1021+ return JSONResponse ( content = [])
10221022
10231023 entries = os .listdir (full_path )
10241024
@@ -1047,11 +1047,11 @@ async def list_files(request: Request):
10471047
10481048 # Combine sorted directories and files
10491049 sorted_entries = directories + files
1050- return sorted_entries
1050+ return JSONResponse ( content = sorted_entries )
10511051
10521052 except Exception as e :
10531053 logger .error (f'Error listing files: { e } ' )
1054- return []
1054+ return JSONResponse ( content = [])
10551055
10561056 logger .debug (f'Starting action execution API on port { args .port } ' )
10571057 run (app , host = '0.0.0.0' , port = args .port )
You can’t perform that action at this time.
0 commit comments