diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-29 20:40:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-29 20:40:52 +0000 |
commit | dbf3ba2d73dfa2b3230ff5829e4a4a49c7c5ba5f (patch) | |
tree | d8511ecc93e977ca7afe03bd2a950add779f4aab /libs/ardour/session_state.cc | |
parent | 501db4747bd00a5f4ff8664a1375b93e3ea2c367 (diff) |
allow zero-length SMF files on disk again; fix some gcc 4.X optimization-on compile warnings
git-svn-id: svn://localhost/ardour2/branches/3.0@7329 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 85d6a1689b..99a8ae2e9e 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -2561,8 +2561,17 @@ Session::cleanup_sources (CleanupReport& rep) for (set<string>::iterator i = all_sources.begin(); i != all_sources.end(); ++i) { - realpath(spath.c_str(), tmppath1); - realpath((*i).c_str(), tmppath2); + if (realpath(spath.c_str(), tmppath1) == 0) { + error << string_compose (_("Cannot expand path %1 (%2)"), + spath, strerror (errno)) << endmsg; + continue; + } + + if (realpath((*i).c_str(), tmppath2) == 0) { + error << string_compose (_("Cannot expand path %1 (%2)"), + (*i), strerror (errno)) << endmsg; + continue; + } if (strcmp(tmppath1, tmppath2) == 0) { used = true; |