From 540761371cef73b97b92c2a7a004b1318de227e0 Mon Sep 17 00:00:00 2001 From: Helge Norberg Date: Wed, 25 Jan 2017 17:52:17 +0100 Subject: [PATCH] #516 Fixed bug with thumbnail generation when there are .-files in the media folder --- CHANGELOG | 2 ++ common/filesystem.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3d54c092b..a70c84c84 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,8 @@ General o Handle stdin EOF as EXIT. o Added support for RESTART in Linux startup script run.sh. o Copy casparcg_auto_restart.bat into Windows releases. + o Fixed bug with thumbnail generation when there are .-files in the media + folder. Consumers --------- diff --git a/common/filesystem.cpp b/common/filesystem.cpp index d93eb1327..877ac7ca6 100644 --- a/common/filesystem.cpp +++ b/common/filesystem.cpp @@ -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) { -- 2.39.2