]> git.sesse.net Git - casparcg/commitdiff
2.1.0: -env: Default to initial-path if log-path fails.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 26 Feb 2012 22:57:07 +0000 (22:57 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 26 Feb 2012 22:57:07 +0000 (22:57 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.1.0@2495 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

common/env.cpp

index c9a80e28444100a2e8cab3fa332cb3e6df839a68..2e5119a76cf40e5a6ff8ac5519faef7fbc8addc1 100644 (file)
@@ -96,14 +96,21 @@ void configure(const std::wstring& filename)
 \r
        try\r
        {\r
+               try\r
+               {\r
+                       auto log_path = boost::filesystem::path(log);\r
+                       if(!boost::filesystem::exists(log_path))\r
+                               boost::filesystem::create_directories(log_path);\r
+               }\r
+               catch(...)\r
+               {\r
+                       log = L"./";\r
+               }\r
+\r
                auto media_path = boost::filesystem::path(media);\r
                if(!boost::filesystem::exists(media_path))\r
                        boost::filesystem::create_directories(media_path);\r
-               \r
-               auto log_path = boost::filesystem::path(log);\r
-               if(!boost::filesystem::exists(log_path))\r
-                       boost::filesystem::create_directories(log_path);\r
-               \r
+                               \r
                auto template_path = boost::filesystem::path(ftemplate);\r
                if(!boost::filesystem::exists(template_path))\r
                        boost::filesystem::create_directories(template_path);\r