summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-01-21 00:47:33 +0100
committerRobin Gareus <robin@gareus.org>2017-01-21 01:19:19 +0100
commit2dc392b517eb47a9cd269c580cacf42089504388 (patch)
tree372ee913c43fabd96bab758756566e8cc26719d5 /libs/ardour/session_state.cc
parent0808b8713846a3aade0a84c80ec0d0715de54242 (diff)
update bbe62da55a - use last-modified-with, strip git-rev
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index ee86a40e09..834f054e0f 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -4428,11 +4428,11 @@ Session::rename (const std::string& new_name)
}
int
-Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFormat& data_format, std::string& created_version)
+Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFormat& data_format, std::string& program_version)
{
bool found_sr = false;
bool found_data_format = false;
- created_version = "";
+ program_version = "";
if (!Glib::file_test (xmlpath, Glib::FILE_TEST_EXISTS)) {
return -1;
@@ -4470,9 +4470,13 @@ Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFo
node = node->children;
while (node != NULL) {
if (!strcmp((const char*) node->name, "ProgramVersion")) {
- xmlChar* val = xmlGetProp (node, (const xmlChar*)"created-with");
+ xmlChar* val = xmlGetProp (node, (const xmlChar*)"modified-with");
if (val) {
- created_version = string ((const char*)val);
+ program_version = string ((const char*)val);
+ size_t sep = program_version.find_first_of("-");
+ if (sep != string::npos) {
+ program_version = program_version.substr (0, sep);
+ }
}
xmlFree (val);
}