From 58d8e91e20141f2379d7fa46e836c800a0443d25 Mon Sep 17 00:00:00 2001 From: auria Date: Thu, 1 Jul 2010 18:06:18 +0000 Subject: [PATCH] Better error checking git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5614 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/io/file_manager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/io/file_manager.cpp b/src/io/file_manager.cpp index ee59c234c..eb045c760 100644 --- a/src/io/file_manager.cpp +++ b/src/io/file_manager.cpp @@ -488,14 +488,16 @@ void FileManager::checkAndCreateAddonsDir() if(!checkAndCreateDirectory(m_addons_dir)) { - fprintf(stderr, "Can not create config dir '%s', falling back to '.'.\n", - m_addons_dir.c_str()); + fprintf(stderr, "Can not create add-ons dir '%s', falling back to '.'.\n", m_addons_dir.c_str()); m_config_dir = "."; } else { //we hope that there will be no problem since we created the other dir - checkAndCreateDirectory(m_addons_dir + "/data/"); + if (!checkAndCreateDirectory(m_addons_dir + "/data/")) + { + fprintf(stderr, "Failed to create add-ons data dir at '%s'\n", (m_addons_dir + "/data/").c_str()); + } } return; } // checkAndCreateAddonsDir