From d4577ca2cbbdd00984d10af5e6b988a96a9965ac Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Fri, 1 Nov 2019 17:04:09 +0000
Subject: [PATCH] check-vulkan: Don't assume SRT_DATA_PATH ends with a slash

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 helpers/check-vulkan.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/helpers/check-vulkan.cpp b/helpers/check-vulkan.cpp
index 7282b00b6..89e6fe82d 100644
--- a/helpers/check-vulkan.cpp
+++ b/helpers/check-vulkan.cpp
@@ -474,13 +474,11 @@ private:
               shadersPath = argv0;
               size_t lastSlash = shadersPath.rfind('/');
               if (lastSlash != std::string::npos)
-                {
-                  shadersPath.resize(lastSlash + 1);
-                }
+                shadersPath.resize(lastSlash);
           }
 
-        auto vertShaderCode = readFile(shadersPath + "vert.spv");
-        auto fragShaderCode = readFile(shadersPath + "frag.spv");
+        auto vertShaderCode = readFile(shadersPath + "/vert.spv");
+        auto fragShaderCode = readFile(shadersPath + "/frag.spv");
 
         VkShaderModule vertShaderModule = createShaderModule(vertShaderCode);
         VkShaderModule fragShaderModule = createShaderModule(fragShaderCode);
-- 
GitLab