summaryrefslogtreecommitdiff
path: root/libs/ardour/export_handler.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-07-30 05:28:25 +0200
committerRobin Gareus <robin@gareus.org>2015-07-30 05:28:43 +0200
commit67c75c5a3390d689d716012e9cdf9405bdad988c (patch)
treec1d7fdebaccb2b316624c7cf189d8be93fa48fa4 /libs/ardour/export_handler.cc
parent0bfdc8203470b95a730d84d433cab20efee77ec8 (diff)
fix file metadata tagging on windows.
This allows TagLib to open the file and create a Tag object (see 2a0365c) Tagging still fails later (taglib seek/SetFilePointer fails when writing)
Diffstat (limited to 'libs/ardour/export_handler.cc')
-rw-r--r--libs/ardour/export_handler.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc
index 46cd247d20..04951980d3 100644
--- a/libs/ardour/export_handler.cc
+++ b/libs/ardour/export_handler.cc
@@ -310,6 +310,13 @@ ExportHandler::finish_timespan ()
}
if (fmt->tag()) {
+ /* close file first, otherwise TagLib enounters an ERROR_SHARING_VIOLATION
+ * The process cannot access the file because it is being used.
+ *
+ * TODO: check Umlauts and encoding in filename.
+ * TagLib eventually calls CreateFileA(),
+ */
+ graph_builder->reset ();
AudiofileTagger::tag_file(filename, *SessionMetadata::Metadata());
}