From 5c12395442d7771d496a68265ea87ea69eebdc55 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Thu, 30 Jan 2014 17:19:32 -0600 Subject: [PATCH] Fix the crash from writing files when the gamelist.xml contains games that do not exist on the filesystem. Write that ES has cleanly shut down to the log file instead of standard output. --- src/XMLReader.cpp | 6 +++--- src/main.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/XMLReader.cpp b/src/XMLReader.cpp index 7552f159c..af74a993a 100644 --- a/src/XMLReader.cpp +++ b/src/XMLReader.cpp @@ -281,9 +281,9 @@ void updateGamelist(SystemData* system) continue; } - boost::filesystem::path nodePath(pathNode.text().get()); - boost::filesystem::path gamePath((*fit)->getPath()); - if(fs::canonical(nodePath) == fs::canonical(gamePath)) + fs::path nodePath(pathNode.text().get()); + fs::path gamePath((*fit)->getPath()); + if(nodePath == gamePath || (fs::exists(nodePath) && fs::exists(gamePath) && fs::equivalent(nodePath, gamePath))) { // found it root.remove_child(fileNode); diff --git a/src/main.cpp b/src/main.cpp index 013919bb4..5bf88103d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -249,7 +249,7 @@ int main(int argc, char* argv[]) window.deinit(); SystemData::deleteSystems(); - std::cout << "EmulationStation cleanly shutting down...\n"; + LOG(LogInfo) << "EmulationStation cleanly shutting down."; return 0; }