We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42f4993 commit cbc7e62Copy full SHA for cbc7e62
source/slang/slang.cpp
@@ -1031,9 +1031,19 @@ SLANG_NO_THROW slang::IModule* SLANG_MCALL Linkage::loadModuleFromSource(
1031
{
1032
return loadedModule;
1033
}
1034
+ String pathStr = path;
1035
+ auto pathInfo = PathInfo::makeFromString(pathStr);
1036
+ if (File::exists(pathStr))
1037
+ {
1038
+ String cannonicalPath;
1039
+ if (SLANG_SUCCEEDED(Path::getCanonical(pathStr, cannonicalPath)))
1040
1041
+ pathInfo = PathInfo::makeNormal(pathStr, cannonicalPath);
1042
+ }
1043
1044
auto module = loadModule(
1045
name,
- PathInfo::makeFromString(path),
1046
+ pathInfo,
1047
source,
1048
SourceLoc(),
1049
&sink,
0 commit comments