@@ -1336,25 +1336,29 @@ func (fs *eosfs) ListFolder(ctx context.Context, ref *provider.Reference, mdKeys
1336
1336
// - also check that searchString not empty:
1337
1337
searchString = mdKeys [i + 1 ]
1338
1338
1339
+ if searchString == "" {
1340
+ return nil , errtypes .NotSupported ("Search requires a search string" )
1341
+ }
1342
+
1339
1343
log .Debug ().Msgf ("eosfs: running search: path=%s searchString=%s" , p , searchString )
1340
1344
1341
1345
eosFileInfos , err := fs .c .SearchDir (ctx , auth , searchString , p )
1346
+
1342
1347
if err != nil {
1343
1348
return nil , errors .Wrap (err , "eosfs: error searching" )
1344
1349
}
1345
1350
1346
1351
for _ , eosFileInfo := range eosFileInfos {
1347
- // filter out sys files
1348
- if ! fs .conf .ShowHiddenSysFiles {
1349
- base := path .Base (eosFileInfo .File )
1350
- if hiddenReg .MatchString (base ) {
1351
- continue
1352
- }
1353
- }
1354
1352
1355
- if finfo , err := fs .convertToFileReference (ctx , eosFileInfo ); err == nil {
1353
+ log .Debug ().Msgf ("seach: eosFileInfo %s" , eosFileInfo .File )
1354
+
1355
+ // Search all files, hidden and not, for the time being
1356
+
1357
+ if finfo , err := fs .convertToResourceInfo (ctx , eosFileInfo ); err == nil {
1356
1358
log .Debug ().Msgf ("eosfs: file name from search %s" , finfo .Name )
1357
1359
finfos = append (finfos , finfo )
1360
+ } else {
1361
+ log .Error ().Err (err ).Msg (" wtf 🥘" )
1358
1362
}
1359
1363
}
1360
1364
@@ -2120,6 +2124,8 @@ func (fs *eosfs) convertToResourceInfo(ctx context.Context, eosFileInfo *eosclie
2120
2124
}
2121
2125
2122
2126
func (fs * eosfs ) convertToFileReference (ctx context.Context , eosFileInfo * eosclient.FileInfo ) (* provider.ResourceInfo , error ) {
2127
+ log := appctx .GetLogger (ctx )
2128
+ log .Debug ().Msg ("convertToFileReference" )
2123
2129
info , err := fs .convert (ctx , eosFileInfo )
2124
2130
if err != nil {
2125
2131
return nil , err
@@ -2258,6 +2264,8 @@ func mergePermissions(l *provider.ResourcePermissions, r *provider.ResourcePermi
2258
2264
}
2259
2265
2260
2266
func (fs * eosfs ) convert (ctx context.Context , eosFileInfo * eosclient.FileInfo ) (* provider.ResourceInfo , error ) {
2267
+ log := appctx .GetLogger (ctx )
2268
+ log .Debug ().Msg ("convert" )
2261
2269
path , err := fs .unwrap (ctx , eosFileInfo .File )
2262
2270
if err != nil {
2263
2271
return nil , err
@@ -2293,6 +2301,8 @@ func (fs *eosfs) convert(ctx context.Context, eosFileInfo *eosclient.FileInfo) (
2293
2301
}
2294
2302
}
2295
2303
2304
+ log .Debug ().Msgf ("convert: marshalling the eosFileInfo %s" , eosFileInfo )
2305
+
2296
2306
info := & provider.ResourceInfo {
2297
2307
Id : & provider.ResourceId {OpaqueId : fmt .Sprintf ("%d" , eosFileInfo .Inode )},
2298
2308
Path : path ,
0 commit comments