diff src/track/types.cc @ 135:0a458cb26ff4

filesystem: move to using std::filesystem after C++17 switch old compilers will croak compiling this, but it's not like we *really* need to support them (they probably croak compiling Qt as well)
author Paper <mrpapersonic@gmail.com>
date Thu, 09 Nov 2023 18:01:56 -0500
parents 39521c47c7a3
children
line wrap: on
line diff
--- a/src/track/types.cc	Thu Nov 09 13:53:04 2023 -0500
+++ b/src/track/types.cc	Thu Nov 09 18:01:56 2023 -0500
@@ -195,7 +195,7 @@
 void LoadPlayers(std::vector<MediaPlayer>& players) {
 	nlohmann::json json;
 	{	
-		std::ifstream is(Filesystem::GetPlayersPath().GetPath());
+		std::ifstream is(Filesystem::GetPlayersPath().string());
 		if (!is.is_open())
 			json = default_players;
 		else
@@ -215,7 +215,7 @@
 void LoadExtensions(std::vector<MediaExtension>& extensions) {
 	nlohmann::json json;
 	{	
-		std::ifstream is(Filesystem::GetExtensionsPath().GetPath());
+		std::ifstream is(Filesystem::GetExtensionsPath().string());
 		if (!is.is_open())
 			json = default_extensions;
 		else
@@ -242,7 +242,7 @@
 	}
 
 	{
-		std::ofstream os(Filesystem::GetPlayersPath().GetPath());
+		std::ofstream os(Filesystem::GetPlayersPath().string());
 		if (!os.is_open())
 			return;
 		os << std::setw(4) << json << std::endl;
@@ -259,7 +259,7 @@
 	}
 
 	{
-		std::ofstream os(Filesystem::GetExtensionsPath().GetPath());
+		std::ofstream os(Filesystem::GetExtensionsPath().string());
 		if (!os.is_open())
 			return;
 		os << std::setw(4) << json << std::endl;