diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-10 17:26:10 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-10 17:26:10 +0000 |
commit | e33ff1c152d40b7d4c5cc736cb1bb64dacfa7b9f (patch) | |
tree | ac6ecddf8b3305e4ecb8ab5700ed8ba326a1bad3 /main/file.c | |
parent | 18c825592319f89650b58a44543b76a43b0c0227 (diff) |
Only try to prefix language if we are not using an absolute path (suffix it otherwise).
en/var/lib/asterisk/sounds/blah.gsm is a very silly path.
(closes issue #12379)
Reported by: kuj
Patches:
12379-absolutepath.diff uploaded by qwell (license 4)
Tested by: kuj, qwell
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114035 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/file.c')
-rw-r--r-- | main/file.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/main/file.c b/main/file.c index 842c4a698..c44941b2b 100644 --- a/main/file.c +++ b/main/file.c @@ -487,7 +487,7 @@ static int fileexists_test(const char *filename, const char *fmt, const char *la return -1; } - if (ast_language_is_prefix) { /* new layout */ + if (ast_language_is_prefix && !is_absolute_path(filename)) { /* new layout */ if (lang) { snprintf(buf, buflen, "%s/%s", lang, filename); } else { @@ -527,11 +527,6 @@ static int fileexists_core(const char *filename, const char *fmt, const char *pr return -1; } - if (is_absolute_path(filename)) { - ast_copy_string(buf, filename, buflen); - return ast_filehelper(buf, NULL, fmt, ACTION_EXISTS); - } - /* We try languages in the following order: * preflang (may include dialect) * lang (preflang without dialect - if any) |