close all source files before renaming interchange tree in Session::rename()
This commit is contained in:
parent
88aaf587ad
commit
59028b6c80
@ -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 ...
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user