mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
We have a generic function for extracting the filename, let's use it.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@368 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
f6b0f87d0a
commit
3f2ac7eb8c
1 changed files with 1 additions and 4 deletions
|
|
@ -303,10 +303,7 @@ static void add_file(struct pa_core *c, const char *pathname) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
const char *e;
|
const char *e;
|
||||||
|
|
||||||
if (!(e = strrchr(pathname, '/')))
|
e = pa_path_get_filename(pathname);
|
||||||
e = pathname;
|
|
||||||
else
|
|
||||||
e++;
|
|
||||||
|
|
||||||
if (stat(pathname, &st) < 0) {
|
if (stat(pathname, &st) < 0) {
|
||||||
pa_log(__FILE__": stat('%s') failed: %s\n", pathname, strerror(errno));
|
pa_log(__FILE__": stat('%s') failed: %s\n", pathname, strerror(errno));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue