tweak MCP search paths
git-svn-id: svn://localhost/ardour2/branches/3.0@12195 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d8627637a5
commit
962cb31294
@ -405,7 +405,7 @@ static const char * const devinfo_env_variable_name = "ARDOUR_MCP_PATH";
|
|||||||
static const char* const devinfo_dir_name = "mcp";
|
static const char* const devinfo_dir_name = "mcp";
|
||||||
static const char* const devinfo_suffix = ".device";
|
static const char* const devinfo_suffix = ".device";
|
||||||
|
|
||||||
static sys::path
|
static SearchPath
|
||||||
system_devinfo_search_path ()
|
system_devinfo_search_path ()
|
||||||
{
|
{
|
||||||
bool devinfo_path_defined = false;
|
bool devinfo_path_defined = false;
|
||||||
@ -418,12 +418,7 @@ system_devinfo_search_path ()
|
|||||||
SearchPath spath (system_data_search_path());
|
SearchPath spath (system_data_search_path());
|
||||||
spath.add_subdirectory_to_paths(devinfo_dir_name);
|
spath.add_subdirectory_to_paths(devinfo_dir_name);
|
||||||
|
|
||||||
// just return the first directory in the search path that exists
|
return spath;
|
||||||
SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists);
|
|
||||||
|
|
||||||
if (i == spath.end()) return sys::path();
|
|
||||||
|
|
||||||
return *i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static sys::path
|
static sys::path
|
||||||
|
@ -55,7 +55,7 @@ static const char * const devprofile_env_variable_name = "ARDOUR_MCP_PATH";
|
|||||||
static const char* const devprofile_dir_name = "mcp";
|
static const char* const devprofile_dir_name = "mcp";
|
||||||
static const char* const devprofile_suffix = ".profile";
|
static const char* const devprofile_suffix = ".profile";
|
||||||
|
|
||||||
static sys::path
|
static SearchPath
|
||||||
system_devprofile_search_path ()
|
system_devprofile_search_path ()
|
||||||
{
|
{
|
||||||
bool devprofile_path_defined = false;
|
bool devprofile_path_defined = false;
|
||||||
@ -68,12 +68,7 @@ system_devprofile_search_path ()
|
|||||||
SearchPath spath (system_data_search_path());
|
SearchPath spath (system_data_search_path());
|
||||||
spath.add_subdirectory_to_paths(devprofile_dir_name);
|
spath.add_subdirectory_to_paths(devprofile_dir_name);
|
||||||
|
|
||||||
// just return the first directory in the search path that exists
|
return spath;
|
||||||
SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists);
|
|
||||||
|
|
||||||
if (i == spath.end()) return sys::path();
|
|
||||||
|
|
||||||
return *i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static sys::path
|
static sys::path
|
||||||
|
Loading…
Reference in New Issue
Block a user