13
0

close all source files before renaming interchange tree in Session::rename()

This commit is contained in:
Paul Davis 2015-06-02 12:08:59 -04:00
parent 88aaf587ad
commit 59028b6c80

View File

@ -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 ...
*/