Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > 2abc6e7be1a61f2f64f540d4a0921e08 > files > 3

mpg123-1.5.1-1.2mdvmes5.src.rpm


 http://www.mpg123.de/cgi-bin/viewvc.cgi/trunk/src/module.c?r1=2377&r2=2446&view=patch

--- src/module.c	2008-08-29 02:43:56.000000000 -0400
+++ src/module.c.oden	2009-12-14 03:42:25.000000000 -0500
@@ -93,13 +93,14 @@ open_module( const char* type, const cha
 
 	chdir(moddir);
 	/* Work out the path of the module to open */
-	module_path_len = strlen(type) + 1 + strlen(name) + strlen(MODULE_FILE_SUFFIX) + 1;
+	/* Note that we need to open ./file, not just file! */
+	module_path_len = 2 + strlen(type) + 1 + strlen(name) + strlen(MODULE_FILE_SUFFIX) + 1;
 	module_path = malloc( module_path_len );
 	if (module_path == NULL) {
 		error1( "Failed to allocate memory for module name: %s", strerror(errno) );
 		goto om_bad;
 	}
-	snprintf( module_path, module_path_len, "%s_%s%s", type, name, MODULE_FILE_SUFFIX );
+	snprintf( module_path, module_path_len, "./%s_%s%s", type, name, MODULE_FILE_SUFFIX );
 	/* Display the path of the module created */
 	debug1( "Module path: %s", module_path );