aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-02 17:47:56 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-02 17:47:56 +0000
commitb5d6d74da5b833453f39e1263343a0319b35cb1a (patch)
tree4dacf95724c0018ca910c454b9efca3605609be3 /res/res_musiconhold.c
parent9668f3c545f73ff4a4c314a41c7713e1dac111c5 (diff)
ignore files in a music on hold directory that begin with '.'
(issue #8249, cboie) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@46964 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 9972889f8..6c0c380bd 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -772,6 +772,10 @@ static int moh_scan_files(struct mohclass *class) {
if ((strlen(files_dirent->d_name) < 4) || ((strlen(files_dirent->d_name) + dirnamelen) >= MAX_MOHFILE_LEN))
continue;
+ /* Skip files that start with a dot */
+ if (files_dirent->d_name[0] == '.')
+ continue;
+
snprintf(filepath, MAX_MOHFILE_LEN, "%s/%s", class->dir, files_dirent->d_name);
if (stat(filepath, &statbuf))