(ctx context.Context)
| 50 | } |
| 51 | |
| 52 | func (t *FsBrowser) getFS(ctx context.Context) (fs afero.Fs, hasRootRef bool) { |
| 53 | // Backward-compat |
| 54 | confLegacy := config.Get(ctx, "services", common.ServiceDataObjectsGRPC+".peer").String() |
| 55 | |
| 56 | conf := config.Get(ctx, "services", common.ServiceDataObjectsGRPC) |
| 57 | fs = afero.NewOsFs() |
| 58 | restrict := conf.Val("allowedLocalDsFolder").Default(confLegacy).String() |
| 59 | if hasRootRef = restrict != ""; hasRootRef { |
| 60 | fs = afero.NewBasePathFs(fs, restrict) |
| 61 | } |
| 62 | return |
| 63 | } |
| 64 | |
| 65 | func (t *FsBrowser) SymlinkInfo(path string, info os.FileInfo) (bool, tree.NodeType, string) { |
| 66 | if info.Mode()&os.ModeSymlink != 0 { |
no test coverage detected