]> git.sesse.net Git - casparcg/blobdiff - common/filesystem.cpp
#516 Fixed bug with thumbnail generation when there are .-files in the media folder
[casparcg] / common / filesystem.cpp
index d93eb1327f21a691158296c48e6b3028185b70d5..877ac7ca68f6c8310d2488d1c83ad16bf2549d7f 100644 (file)
@@ -33,9 +33,11 @@ boost::filesystem::path get_relative(
                const boost::filesystem::path& file,
                const boost::filesystem::path& relative_to)
 {
-       auto result = file.filename();
+       auto result                     = file.filename();
+       auto current_path       = file;
 
-       boost::filesystem::path current_path = file;
+       if (boost::filesystem::equivalent(current_path, relative_to))
+               return L"";
 
        while (true)
        {