Add a path separator to OCL_ICD_VENDORS
authorKenneth Benzie (Benie) <k.benzie@codeplay.com>
Wed, 9 Oct 2019 16:42:46 +0000 (17:42 +0100)
committerBen Ashbaugh <ben.ashbaugh@intel.com>
Thu, 16 Apr 2020 06:16:08 +0000 (23:16 -0700)
commit6d0b214b9cc303cdb0b05b3c0dc9afb0c39998c5
treecaa9068e1900ca8cdd30a5a07cad1f3fdd571892
parent9acc3fcbeadeef27c57d9fb195c4a94fbcf52f66
Add a path separator to OCL_ICD_VENDORS

When using the `OCL_ICD_VENDORS` environment variable a trailing `/`
path separator must be provided by the user, this is surprising.

This patch updates the `sprintf` call to include a `/` when constructing
the `.icd` file path. It also removes the trailing `/` from instances of
the `ICD_VENDOR_PATH` to canonicalised path strings. Existing scripts
which specify a trailing `/` when setting `OCL_ICD_VENDORS` will
continue working as expected since duplicate path separators `//`, while
not canonical, work as if a single path separator is specified.
loader/icd_platform.h
loader/linux/icd_linux.c