]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_repository.c
Fix and cleanup profile and preset dirs.
[mlt] / src / framework / mlt_repository.c
index ffb65daff57db3832420641f8aae61afd42ee50d..acda89cc6272e4e007f75f44c5c9a590951e1ef8 100644 (file)
@@ -495,10 +495,8 @@ mlt_properties mlt_repository_presets( )
        }
        else
        {
-               path = malloc( strlen( mlt_environment( "MLT_DATA" ) ) + 9 );
+               path = malloc( strlen( mlt_environment( "MLT_DATA" ) ) + strlen( PRESETS_DIR ) + 1 );
                strcpy( path, mlt_environment( "MLT_DATA" ) );
-               if ( path[ strlen( path ) - 1 ] != '/' )
-                       path[ strlen( path ) ] = '/';
                strcat( path, PRESETS_DIR );
        }
        list_presets( result, NULL, path );