From 56964fe775348d1aecd1a67e951e25b82ea78a03 Mon Sep 17 00:00:00 2001 From: Rajendraprasad K J Date: Tue, 2 Apr 2019 01:46:45 -0400 Subject: [PATCH] LayerManagerControl: Prevent conversion of filenames into lowercase LayerManagerControl auto-convert all text expressions to lowercase which includes the dump filenames that the user provides. LayerManagerControl should use the filename as provided and should not modify it. Added necessary changes in LayerMangerControl source code so that the text is not converted to lowercase if the expression is a filename. Signed-off-by: Rajendraprasad K J --- .../LayerManagerControl/src/Expression.cpp | 6 ++++++ .../LayerManagerControl/src/ExpressionInterpreter.cpp | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/Expression.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/Expression.cpp index a08dc8f7..af61cd40 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/Expression.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/Expression.cpp @@ -213,6 +213,12 @@ ExpressionList Expression::getNextExpressionClosure(string text) { Expression* expr = *iter; + if((expr->mName).compare("") && + (expr->mName).compare("")) + { + transform(text.begin(), text.end(), text.begin(), ::tolower); + } + if (expr->isVar()) { nextClosure.push_back(expr); diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/ExpressionInterpreter.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/ExpressionInterpreter.cpp index 336507e7..d043dcda 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/ExpressionInterpreter.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/ExpressionInterpreter.cpp @@ -83,7 +83,6 @@ CommandResult ExpressionInterpreter::interpretCommand(string userInput) while (result == CommandSuccess && !ss.eof()) { ss >> text; - transform(text.begin(), text.end(), text.begin(), ::tolower); ExpressionList::const_iterator iter = currentState.begin(); ExpressionList::const_iterator end = currentState.end();