KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

loader: Remove duplicated delimiting chars in paths #2664

Closed t-chaik closed 6 years ago

t-chaik commented 6 years ago

Before loading a manifest file, its full path is strcmp() with already loaded ones in order not to load the same file twice. While being simple and efficent, this mechanism is not able to detect subtle duplicates like these:

/usr/share/vulkan/icd.d/intel_icd.x86_64.json /usr/share//vulkan/icd.d/intel_icd.x86_64.json

This patch ensure that searched paths do not contains such duplicated directory delimiting characters in order to avoid this kind of problem.

Fixes #2331 Fixes #2629

CLAassistant commented 6 years ago

CLA assistant check
All committers have signed the CLA.