]> git.sesse.net Git - casparcg/blobdiff - common/env.cpp
Merge pull request #239 from CasparCG/ffmpeg_producer_nb_frames
[casparcg] / common / env.cpp
index 6534bc052d865a0437d786ba1772fc1ec6db165f..d2e941bbcfafd39f39f6ea4e80b3d26000039be3 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
+* Copyright 2013 Sveriges Television AB http://casparcg.com/\r
 *\r
 * This file is part of CasparCG (www.casparcg.com).\r
 *\r
@@ -70,6 +70,18 @@ void configure(const std::wstring& filename)
                data = widen(paths.get(L"data-path", initialPath + L"\\data\\"));\r
                thumbnails = widen(paths.get(L"thumbnails-path", initialPath + L"\\thumbnails\\"));\r
 \r
+               //Make sure that all paths have a trailing backslash\r
+               if(media.at(media.length()-1) != L'\\')\r
+                       media.append(L"\\");\r
+               if(log.at(log.length()-1) != L'\\')\r
+                       log.append(L"\\");\r
+               if(ftemplate.at(ftemplate.length()-1) != L'\\')\r
+                       ftemplate.append(L"\\");\r
+               if(data.at(data.length()-1) != L'\\')\r
+                       data.append(L"\\");\r
+               if(thumbnails.at(thumbnails.length()-1) != L'\\')\r
+                       thumbnails.append(L"\\");\r
+\r
                try\r
                {\r
                        for(auto it = boost::filesystem2::wdirectory_iterator(initialPath); it != boost::filesystem2::wdirectory_iterator(); ++it)\r