From 27842050d3954f884d3d428d8ce6dda59e2a00ca Mon Sep 17 00:00:00 2001 From: Collin Date: Mon, 11 May 2020 12:55:29 -0700 Subject: [SDL4.0]SDL does not create icons folder in case it was removed (#2649) The check for existence directory of app icons folder has been added to SetAppIconRequest. Co-authored-by: ValeriiMalkov --- .../sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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); } -- cgit v1.2.1