]> git.sesse.net Git - casparcg/commitdiff
#516 Fixed bug with thumbnail generation when there are .-files in the media folder
authorHelge Norberg <helge.norberg@svt.se>
Wed, 25 Jan 2017 16:52:17 +0000 (17:52 +0100)
committerHelge Norberg <helge.norberg@svt.se>
Wed, 25 Jan 2017 16:52:17 +0000 (17:52 +0100)
CHANGELOG
common/filesystem.cpp

index 3d54c092bc3a68197f05da59550d2b9e7a27f4cd..a70c84c84a8cf1d99b53f46330024ae5bd8e0008 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -22,6 +22,8 @@ General
   o Handle stdin EOF as EXIT.\r
   o Added support for RESTART in Linux startup script run.sh.\r
   o Copy casparcg_auto_restart.bat into Windows releases.\r
+  o Fixed bug with thumbnail generation when there are .-files in the media\r
+    folder.\r
 \r
 Consumers\r
 ---------\r
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)
        {