]> git.sesse.net Git - casparcg/commitdiff
Fixed CINF return code. Fixed correct filename for templates when they are placed...
authorZebiolo <Zebiolo@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 26 Apr 2012 10:11:19 +0000 (10:11 +0000)
committerZebiolo <Zebiolo@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 26 Apr 2012 10:11:19 +0000 (10:11 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/trunk@2917 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

protocol/amcp/AMCPCommandsImpl.cpp

index b9026678057301c059c52704db6cedebe0ffc3a4..ce9076021b43d36056840f8e22fbfb820ebe5c7b 100644 (file)
@@ -178,7 +178,7 @@ std::wstring ListTemplates()
                        relativePath = boost::filesystem::wpath(dir + L"/" + file);\r
                                                \r
                        auto str = relativePath.replace_extension(TEXT("")).external_file_string();\r
-                       if(str[0] == '\\' || str[0] == '/')\r
+                       while(str.size() > 0 && (str[0] == '\\' || str[0] == '/'))\r
                                str = std::wstring(str.begin() + 1, str.end());\r
 \r
                        replyString << TEXT("\"") << str\r
@@ -1327,7 +1327,7 @@ bool CinfCommand::DoExecute()
                        auto path = itr->path();\r
                        auto file = path.replace_extension(L"").filename();\r
                        if(boost::iequals(file, _parameters.at(0)))\r
-                               info += MediaInfo(itr->path()) + L"\r\n";\r
+                               info += MediaInfo(itr->path());\r
                }\r
 \r
                if(info.empty())\r
@@ -1335,7 +1335,7 @@ bool CinfCommand::DoExecute()
                        SetReplyString(TEXT("404 CINF ERROR\r\n"));\r
                        return false;\r
                }\r
-               replyString << TEXT("200 CINF OK\r\n");\r
+               replyString << TEXT("201 CINF OK\r\n");\r
                replyString << info << "\r\n";\r
        }\r
        catch(...)\r