From bea83212056f7f0e30be5cc6598cc9a10b86fb19 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 25 Nov 2022 14:19:59 +0100 Subject: [PATCH] Use prefix search for locating graphics files Signed-off-by: Evan Lezar --- internal/discover/graphics.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/internal/discover/graphics.go b/internal/discover/graphics.go index 17e252eb..4d66832b 100644 --- a/internal/discover/graphics.go +++ b/internal/discover/graphics.go @@ -70,18 +70,14 @@ func NewGraphicsMountsDiscoverer(logger *logrus.Logger, root string) (Discover, jsonMounts := NewMounts( logger, - lookup.NewFileLocator(logger, root), + lookup.NewFileLocator(logger, root, "/etc", "/usr/share"), root, []string{ - // TODO: We should handle this more cleanly - "/etc/glvnd/egl_vendor.d/10_nvidia.json", - "/etc/vulkan/icd.d/nvidia_icd.json", - "/etc/vulkan/implicit_layer.d/nvidia_layers.json", - "/usr/share/glvnd/egl_vendor.d/10_nvidia.json", - "/usr/share/vulkan/icd.d/nvidia_icd.json", - "/usr/share/vulkan/implicit_layer.d/nvidia_layers.json", - "/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json", - "/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json", + "glvnd/egl_vendor.d/10_nvidia.json", + "vulkan/icd.d/nvidia_icd.json", + "vulkan/implicit_layer.d/nvidia_layers.json", + "egl/egl_external_platform.d/15_nvidia_gbm.json", + "egl/egl_external_platform.d/10_nvidia_wayland.json", }, )