X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=common%2Ffilesystem.cpp;h=877ac7ca68f6c8310d2488d1c83ad16bf2549d7f;hb=5422850939eee2b223eff6a0274c5d3c1fbe68bb;hp=d93eb1327f21a691158296c48e6b3028185b70d5;hpb=cc58e432aeb71030449587d23dbb72c6b0ec23e5;p=casparcg 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) {