summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-01-05 17:14:51 +0000
committerPierre Ossman <ossman@cendio.se>2006-01-05 17:14:51 +0000
commit3f2ac7eb8ce8db8947f1bfc195f845be0d409fde (patch)
treeacb1a252fa5947e26f60517669ee7d4353aaa2df
parentf6b0f87d0af87289204ee7b251bd9e23584ebc6b (diff)
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
-rw-r--r--polyp/scache.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/polyp/scache.c b/polyp/scache.c
index 143f9740..54563bad 100644
--- a/polyp/scache.c
+++ b/polyp/scache.c
@@ -303,10 +303,7 @@ static void add_file(struct pa_core *c, const char *pathname) {
struct stat st;
const char *e;
- if (!(e = strrchr(pathname, '/')))
- e = pathname;
- else
- e++;
+ e = pa_path_get_filename(pathname);
if (stat(pathname, &st) < 0) {
pa_log(__FILE__": stat('%s') failed: %s\n", pathname, strerror(errno));