diff --git a/openVulkanoCpp/AR/ArRecorder.cpp b/openVulkanoCpp/AR/ArRecorder.cpp index e9388e4..594b14b 100644 --- a/openVulkanoCpp/AR/ArRecorder.cpp +++ b/openVulkanoCpp/AR/ArRecorder.cpp @@ -25,6 +25,8 @@ namespace openVulkanoCpp::AR { namespace { + constexpr std::string_view RECORDING_METADATA_FILENAME = "ArRecording.xml"; + std::filesystem::path GeneratePath(const std::filesystem::path& baseDir, std::string_view name) { std::stringstream ss; @@ -164,7 +166,7 @@ namespace openVulkanoCpp::AR m_metadataWriter = std::make_unique(m_settings.path, "meta_{:05d}.tar.gz", ArchiveConfig::TAR_GZ, m_settings.archiveSize, true); m_highResWriter = std::make_unique(m_settings.path, "highres_{:05d}.tar", ArchiveConfig::TAR, m_settings.archiveSize, true); - std::ofstream platformInfoStream(m_settings.path / "ArRecording.xml"); + std::ofstream platformInfoStream(m_settings.path / RECORDING_METADATA_FILENAME); platformInfoStream << m_session->GetSessionMetadata().ToXML(); platformInfoStream.close(); } @@ -189,8 +191,8 @@ namespace openVulkanoCpp::AR { if (writer) writer->Move(path); } - if (std::filesystem::exists(m_settings.path / "ArRecording.xml")) - std::filesystem::rename(m_settings.path / "ArRecording.xml", path + "/ArRecording.xml"); + if (std::filesystem::exists(m_settings.path / RECORDING_METADATA_FILENAME)) + std::filesystem::rename(m_settings.path / RECORDING_METADATA_FILENAME, path + "/" + RECORDING_METADATA_FILENAME); } m_persistent = true;