#include <libgen.h>
-/** the default subdirectory of the prefix for holding profiles */
-#define PROFILES_DIR "/share/mlt/profiles/"
+/** the default subdirectory of the datadir for holding profiles */
+#define PROFILES_DIR "/profiles"
/** Load a profile from the system folder.
*
// Load from $prefix/share/mlt/profiles if no env var
if ( prefix == NULL )
{
- prefix = PREFIX;
+ prefix = mlt_environment( "MLT_DATA" );
filename = calloc( 1, strlen( prefix ) + strlen( PROFILES_DIR ) + 2 );
strcpy( filename, prefix );
if ( filename[ strlen( filename ) - 1 ] != '/' )
#include <dirent.h>
#include <sys/stat.h>
+/** the default subdirectory of the datadir for holding presets */
+#define PRESETS_DIR "/presets"
+
/** \brief Repository class
*
* The Repository is a collection of plugin modules and their services and service metadata.
{
path = malloc( strlen( mlt_environment( "MLT_DATA" ) ) + 9 );
strcpy( path, mlt_environment( "MLT_DATA" ) );
- strcat( path, "/presets" );
+ if ( path[ strlen( path ) - 1 ] != '/' )
+ path[ strlen( path ) ] = '/';
+ strcat( path, PRESETS_DIR );
}
list_presets( result, NULL, path );
free( path );