[SystemSetting] Fixed using virtual paths.
authorTomasz Marciniak <t.marciniak@samsung.com>
Thu, 10 Sep 2015 10:26:01 +0000 (12:26 +0200)
committerTomasz Marciniak <t.marciniak@samsung.com>
Thu, 10 Sep 2015 10:26:01 +0000 (12:26 +0200)
[Verification] Code compiles. TCT pass rate 100%
Properties can be set with virtual paths.

Change-Id: I95316e15bc8f77ab1e852bb91d75e6174c4794c5
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
src/systemsetting/systemsetting_instance.cc

index ae66b00001db8b7b2ec4c63efac3092e00d3bd68..9eb7d2aac8903244b448bbde42e169c40bd78bc6 100755 (executable)
@@ -21,6 +21,7 @@
 #include "common/logger.h"
 #include "common/picojson.h"
 #include "common/task-queue.h"
+#include "common/virtual_fs.h"
 
 #include <system_settings.h>
 
@@ -145,7 +146,8 @@ void SystemSettingInstance::setProperty(const picojson::value& args, picojson::o
 
   auto get = [this, type, value, callback_id](const std::shared_ptr<picojson::value>& response) -> void {
     LoggerD("Setting platform value");
-    PlatformResult status = setPlatformPropertyValue(type, value);
+    std::string real_path = VirtualFs::GetInstance().GetRealPath(value);
+    PlatformResult status = setPlatformPropertyValue(type, real_path);
     picojson::object& obj = response->get<picojson::object>();
     if (status.IsSuccess()) {
       ReportSuccess(obj);