diff options
author | Collin <iCollin@users.noreply.github.com> | 2020-05-11 13:43:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 16:43:32 -0400 |
commit | 902144c5e0f9321115274e77f16c8ee33a4f1acb (patch) | |
tree | 3248ef858de8d75784b059b344e4eb555972dd1b | |
parent | 9f7ab6890e5b68762dabfb489159c35f36ec8a20 (diff) | |
download | sdl_core-902144c5e0f9321115274e77f16c8ee33a4f1acb.tar.gz |
[SDL4.0]SDL does not create icons folder in case it was removed (#2649) (#3359)
The check for existence directory of app icons folder
has been added to SetAppIconRequest.
Co-authored-by: ValeriiMalkov <vmalkov@luxoft.com>
Co-authored-by: ValeriiMalkov <vmalkov@luxoft.com>
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc | 8 |
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); } |