summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc
index acf312d532..83f74f31b9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc
@@ -60,6 +60,14 @@ SetAppIconRequest::SetAppIconRequest(
, is_icons_saving_enabled_(false) {
const std::string path =
application_manager_.get_settings().app_icons_folder();
+
+ if (!file_system::DirectoryExists(path)) {
+ LOG4CXX_WARN(logger_, "App icons folder doesn't exist.");
+ if (!file_system::CreateDirectoryRecursively(path)) {
+ LOG4CXX_ERROR(logger_, "Unable to create app icons directory: " << path);
+ }
+ }
+
is_icons_saving_enabled_ = file_system::IsWritingAllowed(path) &&
file_system::IsReadingAllowed(path);
}