mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
fix utter confusion about session _path in new sessions.
Yikes!
This commit is contained in:
parent
7bc3e0dab4
commit
60a9213035
1 changed files with 14 additions and 6 deletions
|
|
@ -136,13 +136,21 @@ Session::pre_engine_init (string fullpath)
|
||||||
/* discover canonical fullpath */
|
/* discover canonical fullpath */
|
||||||
|
|
||||||
char buf[PATH_MAX+1];
|
char buf[PATH_MAX+1];
|
||||||
if (!realpath (fullpath.c_str(), buf) && (errno != ENOENT)) {
|
|
||||||
|
if (!realpath (fullpath.c_str(), buf)) {
|
||||||
|
if (errno == ENOENT) {
|
||||||
|
/* fullpath does not exist yet, so realpath() returned
|
||||||
|
* ENOENT. Just use it as-is
|
||||||
|
*/
|
||||||
|
_path = fullpath;
|
||||||
|
} else {
|
||||||
error << string_compose(_("Could not use path %1 (%2)"), buf, strerror(errno)) << endmsg;
|
error << string_compose(_("Could not use path %1 (%2)"), buf, strerror(errno)) << endmsg;
|
||||||
destroy ();
|
destroy ();
|
||||||
throw failed_constructor();
|
throw failed_constructor();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
_path = string(buf);
|
_path = string(buf);
|
||||||
|
}
|
||||||
|
|
||||||
/* we require _path to end with a dir separator */
|
/* we require _path to end with a dir separator */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue