File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1021,8 +1021,12 @@ class NamespaceFS {
1021
1021
1022
1022
// NOTE: don't move this code after the open
1023
1023
// this can lead to ENOENT failures due to file not exists when content size is 0
1024
- // if entry is a directory object and its content size = 0 - return empty response
1025
- if ( await this . _is_empty_directory_content ( file_path , fs_context , params ) ) return null ;
1024
+ // if entry is a directory object and its content size = 0 - close the stream and return empty response
1025
+ if ( await this . _is_empty_directory_content ( file_path , fs_context , params ) ) {
1026
+ res . end ( ) ;
1027
+ await stream_utils . wait_finished ( res , { signal : object_sdk . abort_controller . signal } ) ;
1028
+ return null ;
1029
+ }
1026
1030
1027
1031
file = await nb_native ( ) . fs . open (
1028
1032
fs_context ,
You can’t perform that action at this time.
0 commit comments