[asterisk-commits] qwell: branch 1.4 r114035 - /branches/1.4/main/file.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 10 12:26:11 CDT 2008


Author: qwell
Date: Thu Apr 10 12:26:10 2008
New Revision: 114035

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114035
Log:
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

Modified:
    branches/1.4/main/file.c

Modified: branches/1.4/main/file.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/file.c?view=diff&rev=114035&r1=114034&r2=114035
==============================================================================
--- branches/1.4/main/file.c (original)
+++ branches/1.4/main/file.c Thu Apr 10 12:26:10 2008
@@ -487,7 +487,7 @@
 		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 {
@@ -525,11 +525,6 @@
 
 	if (buf == NULL) {
 		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:




More information about the asterisk-commits mailing list