alsa/alsa-lib-ignore-non-accessible-ALSA_CONFIG_PATH.patch

13 lines
441 B
Diff
Raw Normal View History

--- a/src/conf.c
+++ b/src/conf.c
@@ -3904,6 +3904,9 @@ int snd_config_update_r(snd_config_t **_top, snd_config_update_t **_update, cons
configs = cfgs;
if (!configs) {
configs = getenv(ALSA_CONFIG_PATH_VAR);
+ /* ignore the non-accessible override */
+ if (configs && access(configs, R_OK) < 0)
+ configs = NULL;
if (!configs || !*configs) {
const char *topdir = snd_config_topdir();
char *s = alloca(strlen(topdir) +