font = paths.get(L"font-path", initialPath + L"\\fonts\\");
thumbnails = paths.get(L"thumbnails-path", initialPath + L"\\data\\");
+ //Make sure that all paths have a trailing backslash
+ if(media.at(media.length()-1) != L'\\')
+ media.append(L"\\");
+ if(log.at(log.length()-1) != L'\\')
+ log.append(L"\\");
+ if(ftemplate.at(ftemplate.length()-1) != L'\\')
+ ftemplate.append(L"\\");
+ if(data.at(data.length()-1) != L'\\')
+ data.append(L"\\");
+ if(font.at(font.length()-1) != L'\\')
+ font.append(L"\\");
+ if(thumbnails.at(thumbnails.length()-1) != L'\\')
+ thumbnails.append(L"\\");
+
try
{
for(auto it = boost::filesystem::directory_iterator(initialPath); it != boost::filesystem::directory_iterator(); ++it)
if(!boost::filesystem::exists(data_path))
boost::filesystem::create_directories(data_path);
+ auto font_path = boost::filesystem::path(font);
+ if(!boost::filesystem::exists(font_path))
+ boost::filesystem::create_directories(font_path);
+
auto thumbnails_path = boost::filesystem::path(thumbnails);
if(!boost::filesystem::exists(thumbnails_path))
boost::filesystem::create_directories(thumbnails_path);
if (params.size() != 2)
return core::frame_producer::empty();
- auto dir = boost::filesystem::path(env::media_folder() + L"\\" + params[1]).parent_path();
+ auto dir = boost::filesystem::path(env::media_folder() + params[1]).parent_path();
auto basename = boost::filesystem3::basename(params[1]);
std::set<std::wstring> files;
boost::filesystem::directory_iterator end;
return core::create_const_producer(std::move(frames), width, height);
}
- std::wstring filename = env::media_folder() + L"\\" + params[0];
+ std::wstring filename = env::media_folder() + params[0];
auto ext = std::find_if(extensions.begin(), extensions.end(), [&](const std::wstring& ex) -> bool
{