diff options
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 5461afbf7..996f8e32f 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -118,6 +118,13 @@ struct IncludeHandlerImpl : IncludeHandler return SLANG_FAIL; } + SlangPathType pathType; + SLANG_RETURN_ON_FAIL(fileSystemExt->getPathType(relPath.begin(), &pathType)); + if (pathType != SLANG_PATH_TYPE_FILE) + { + return SLANG_E_NOT_FOUND; + } + // Get the canonical path ComPtr<ISlangBlob> canonicalPathBlob; SLANG_RETURN_ON_FAIL(fileSystemExt->getCanoncialPath(relPath.begin(), canonicalPathBlob.writeRef())); |
