]> git.sesse.net Git - casparcg/commitdiff
* Don't show base path in FLS. Use INFO PATHS to get that.
authorHelge Norberg <helge.norberg@svt.se>
Tue, 3 Nov 2015 15:44:30 +0000 (16:44 +0100)
committerHelge Norberg <helge.norberg@svt.se>
Tue, 3 Nov 2015 15:44:30 +0000 (16:44 +0100)
common/filesystem.cpp
common/filesystem.h
protocol/amcp/AMCPCommandsImpl.cpp

index c286b6d57d3ab6981020f9a0c582a63e582df0dd..41869ad0427a48c9268a387824bf60be23001aa3 100644 (file)
 
 namespace caspar {
 
-boost::filesystem::path get_relative_without_extension(
+boost::filesystem::path get_relative(
                const boost::filesystem::path& file,
                const boost::filesystem::path& relative_to)
 {
-       auto result = file.stem();
+       auto result = file.filename();
 
        boost::filesystem::path current_path = file;
 
@@ -52,4 +52,13 @@ boost::filesystem::path get_relative_without_extension(
        return result;
 }
 
+boost::filesystem::path get_relative_without_extension(
+               const boost::filesystem::path& file,
+               const boost::filesystem::path& relative_to)
+{
+       return get_relative(
+                       file.parent_path() / file.stem(),
+                       relative_to);
+}
+
 }
index df5bf2b451392882ad6c8b39f30b89c1eab0d25f..95605a7ca86ccb31a7cb0edd744f0f2b031ba720 100644 (file)
@@ -27,6 +27,9 @@
 
 namespace caspar {
 
+boost::filesystem::path get_relative(
+               const boost::filesystem::path& file,
+               const boost::filesystem::path& relative_to);
 boost::filesystem::path get_relative_without_extension(
                const boost::filesystem::path& file,
                const boost::filesystem::path& relative_to);
index 181e8ac20248cd9607d2213ace3eb3f343596d3c..757065db0e7907cfe71ff1ee275be91a91efd9b3 100644 (file)
@@ -2242,7 +2242,7 @@ std::wstring fls_command(command_context& ctx)
        replyString << L"200 FLS OK\r\n";
 
        for (auto& font : core::text::list_fonts())
-               replyString << L"\"" << font.first << L"\" \"" << font.second << L"\"\r\n";
+               replyString << L"\"" << font.first << L"\" \"" << get_relative(font.second, env::font_folder()).wstring() << L"\"\r\n";
 
        replyString << L"\r\n";