mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Use Glib::file_test instead of PBD::sys::exists
git-svn-id: svn://localhost/ardour2/branches/3.0@12883 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5c988c459e
commit
bc205191bf
1 changed files with 7 additions and 5 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <glibmm/fileutils.h>
|
||||||
#include <glibmm/miscutils.h>
|
#include <glibmm/miscutils.h>
|
||||||
|
|
||||||
#include "pbd/controllable_descriptor.h"
|
#include "pbd/controllable_descriptor.h"
|
||||||
|
|
@ -120,11 +121,12 @@ system_midi_map_search_path ()
|
||||||
spath.add_subdirectory_to_paths(midi_map_dir_name);
|
spath.add_subdirectory_to_paths(midi_map_dir_name);
|
||||||
|
|
||||||
// just return the first directory in the search path that exists
|
// just return the first directory in the search path that exists
|
||||||
SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists);
|
for (SearchPath::const_iterator i = spath.begin(); i != spath.end(); ++i) {
|
||||||
|
if (Glib::file_test (*i, Glib::FILE_TEST_EXISTS)) {
|
||||||
if (i == spath.end()) return sys::path();
|
return *i;
|
||||||
|
}
|
||||||
return *i;
|
}
|
||||||
|
return sys::path();
|
||||||
}
|
}
|
||||||
|
|
||||||
static sys::path
|
static sys::path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue