Mixer: Fix opening project by relative pathname on commandline.
This commit is contained in:
parent
4bda8db1fd
commit
4c5551ad8e
|
@ -1131,11 +1131,14 @@ Mixer::command_load ( const char *path, const char *display_name )
|
||||||
{
|
{
|
||||||
mixer->deactivate();
|
mixer->deactivate();
|
||||||
|
|
||||||
chdir( path );
|
|
||||||
|
|
||||||
load_project_settings();
|
|
||||||
|
|
||||||
Project::close();
|
Project::close();
|
||||||
|
|
||||||
|
char *pwd = (char*)malloc( PATH_MAX + 1 );
|
||||||
|
getcwd( pwd, PATH_MAX );
|
||||||
|
chdir( path );
|
||||||
|
load_project_settings();
|
||||||
|
chdir( pwd );
|
||||||
|
free( pwd );
|
||||||
|
|
||||||
if ( Project::open( path ) )
|
if ( Project::open( path ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -272,10 +272,10 @@ Project::open ( const char *name )
|
||||||
else
|
else
|
||||||
*_created_on = 0;
|
*_created_on = 0;
|
||||||
|
|
||||||
set_name( name );
|
|
||||||
|
|
||||||
*_path = '\0';
|
getcwd( _path, sizeof( _path ) );
|
||||||
fl_filename_absolute( _path, sizeof( _path ), "." );
|
|
||||||
|
set_name( _path );
|
||||||
|
|
||||||
_is_open = true;
|
_is_open = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue