summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-06-02 12:08:59 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-02 12:09:04 -0400
commit59028b6c803beabdff4983b5be78232db965a678 (patch)
tree53185b9518fb2f3557ac48ac397577822bc25b48 /libs
parent88aaf587adbf29e89eee5bbeaa821dbc9947ff51 (diff)
close all source files before renaming interchange tree in Session::rename()
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session_state.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 1396493ff8..8bcd892f4d 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -3676,6 +3676,17 @@ Session::rename (const std::string& new_name)
* Backup files are left unchanged and not renamed.
*/
+ /* Windows requires that we close all files before attempting the
+ * rename
+ */
+
+ for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) {
+ boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (i->second);
+ if (fs) {
+ fs->close ();
+ }
+ }
+
/* pass one: not 100% safe check that the new directory names don't
* already exist ...
*/