diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-23 02:15:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-23 02:15:51 +0000 |
commit | 6129d2bd1b15fa90e38886ca48109a3f79c5991a (patch) | |
tree | c71fdad39c34bb26d8c00a604b3962e186aa38ff /libs/ardour/session_state.cc | |
parent | bd71f58fb240410efe1f9459644ace9e6ef67b2a (diff) |
fix timestretch naming issue, #1501
git-svn-id: svn://localhost/ardour2/trunk@1494 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 8c3c50b8e6..ab6e91ba9b 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1450,11 +1450,16 @@ Session::path_from_region_name (string name, string identifier) } else { snprintf (buf, sizeof(buf), "%s/%s-%" PRIu32 ".wav", dir.c_str(), name.c_str(), n); } - if (access (buf, F_OK) != 0) { + + if (!g_file_test (buf, G_FILE_TEST_EXISTS)) { return buf; } } + error << string_compose (_("cannot create new file from region name \"%1\" with ident = \"%2\": too many existing files with similar names"), + name, identifier) + << endmsg; + return ""; } |