From 269282fd3647f1b201d2aae4c82b0c0af16c6420 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 7 Sep 2023 10:20:26 -0400 Subject: Add -repro-fallback-directory (#3188) Co-authored-by: Yong He --- source/compiler-core/slang-dxc-compiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/compiler-core/slang-dxc-compiler.cpp') diff --git a/source/compiler-core/slang-dxc-compiler.cpp b/source/compiler-core/slang-dxc-compiler.cpp index 6956a3627..fc42dfc40 100644 --- a/source/compiler-core/slang-dxc-compiler.cpp +++ b/source/compiler-core/slang-dxc-compiler.cpp @@ -133,8 +133,8 @@ public: // If it starts with ./ then attempt to strip it if (filePath.startsWith("./")) { - String remaining(filePath.subString(2, filePath.getLength() - 2)); - + const String remaining = filePath.getUnownedSlice().tail(2); + // Okay if we strip ./ and what we have is absolute, then it's the absolute path that we care about, // otherwise we just leave as is. if (Path::isAbsolute(remaining)) -- cgit v1.2.3