mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: complain louder when profile files are missing
This commit is contained in:
parent
4cf0826b4f
commit
3659d70aef
1 changed files with 9 additions and 3 deletions
|
|
@ -4948,10 +4948,16 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
|
|||
|
||||
fn = pa_maybe_prefix_path(fname ? fname : "default.conf",
|
||||
get_default_profile_dir());
|
||||
if (access(fn, R_OK) != 0 && fname != NULL) {
|
||||
pa_log_error("profile-set '%s' can't be accessed, trying default.conf", fn);
|
||||
fn = pa_maybe_prefix_path("default.conf",
|
||||
if ((r = access(fn, R_OK)) != 0) {
|
||||
if (fname != NULL) {
|
||||
pa_log_warn("profile-set '%s' can't be accessed: %m", fn);
|
||||
fn = pa_maybe_prefix_path("default.conf",
|
||||
get_default_profile_dir());
|
||||
r = access(fn, R_OK);
|
||||
}
|
||||
if (r != 0) {
|
||||
pa_log_warn("profile-set '%s' can't be accessed: %m", fn);
|
||||
}
|
||||
}
|
||||
r = pa_config_parse(fn, NULL, items, NULL, false, ps);
|
||||
pa_xfree(fn);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue