From 9db024791f8a3387c74f2dbcaba7c924dfdfdc9f Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Tue, 12 Apr 2016 18:06:56 +0200 Subject: [PATCH] mimetype: use the default command if none is configured --- src/index/mimetype.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index/mimetype.cpp b/src/index/mimetype.cpp index 1cd7a729..11073957 100644 --- a/src/index/mimetype.cpp +++ b/src/index/mimetype.cpp @@ -64,6 +64,7 @@ static string mimetypefromdata(RclConfig *cfg, const string &fn, bool usfc) vector cmd; string scommand; if (cfg->getConfParam("systemfilecommand", scommand)) { + LOGDEB2(("mimetype: syscmd from config: %s\n", scommand.c_str())); stringToStrings(scommand, cmd); string exe; if (cmd.empty()) { @@ -74,6 +75,10 @@ static string mimetypefromdata(RclConfig *cfg, const string &fn, bool usfc) cmd[0] = exe; } cmd.push_back(fn); + } else { + LOGDEB(("mimetype:systemfilecommand not found, using %s\n", + stringsToString(tradfilecmd).c_str())); + cmd = tradfilecmd; } string result;