diff options
author | Collin <iCollin@users.noreply.github.com> | 2020-05-11 12:55:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 15:55:29 -0400 |
commit | 27842050d3954f884d3d428d8ce6dda59e2a00ca (patch) | |
tree | 80a44be39c0c8936dd1552e5e175a7a7d570f6af | |
parent | 9cc81b71830bf00911b44bd7e88328c6c17683c4 (diff) | |
download | sdl_core-fix/icons_folder.tar.gz |
[SDL4.0]SDL does not create icons folder in case it was removed (#2649)fix/icons_folder
The check for existence directory of app icons folder
has been added to SetAppIconRequest.
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); } |