File tree 2 files changed +16
-3
lines changed
src/backend/src/filesystem
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -827,6 +827,10 @@ module.exports = class FSNodeContext {
827
827
. with ( 'fs.fsentry:uuid' )
828
828
. obtain ( 'fs.fsentry:path' )
829
829
. exec ( this . uid ?? this . entry . uuid ) ;
830
+
831
+ if ( fsentry . path && fsentry . path . startsWith ( '/-void/' ) ) {
832
+ fsentry . broken = true ;
833
+ }
830
834
831
835
fsentry . dirname = _path . dirname ( fsentry . path ) ;
832
836
fsentry . dirpath = fsentry . dirname ;
@@ -856,8 +860,13 @@ module.exports = class FSNodeContext {
856
860
// Use client-friendly IDs for shortcut_to
857
861
fsentry . shortcut_to = ( res . shortcut_to
858
862
? await id2uuid ( res . shortcut_to ) : undefined ) ;
859
- fsentry . shortcut_to_path = ( res . shortcut_to
860
- ? await id2path ( res . shortcut_to ) : undefined ) ;
863
+ try {
864
+ fsentry . shortcut_to_path = ( res . shortcut_to
865
+ ? await id2path ( res . shortcut_to ) : undefined ) ;
866
+ } catch ( e ) {
867
+ fsentry . shortcut_invalid = true ;
868
+ fsentry . shortcut_uid = res . shortcut_to ;
869
+ }
861
870
862
871
// Add file_request_url
863
872
if ( res . file_request_token && res . file_request_token !== '' ) {
Original file line number Diff line number Diff line change @@ -250,7 +250,11 @@ class DatabaseFSEntryService extends AdvancedBase {
250
250
info . given ( 'fs.fsentry:uuid' ) . provide ( 'fs.fsentry:path' )
251
251
. addStrategy ( 'mysql' , async uuid => {
252
252
// TODO: move id2path here
253
- return await id2path ( uuid ) ;
253
+ try {
254
+ return await id2path ( uuid ) ;
255
+ } catch ( e ) {
256
+ return '/-void/' + uuid ;
257
+ }
254
258
} ) ;
255
259
256
260
( async ( ) => {
You can’t perform that action at this time.
0 commit comments