Code of:
- StepBackupIcons,
- StepRecoverIcons,
- StepRemoveIcons,
was adjusted to code of StepCreateIcons which preserves
icon extension during creation of platform icons.
Note: internalizalizaton of icons is not supported as
there is needed policy so there is copy of one icon per
ui application of package.
Change-Id: Ic9229a64d0a4973f6ab3275c12dd9ca4672a73a3
// gather icon info
for (; ui != nullptr; ui = ui->next) {
bf::path app_icon = bf::path(getIconPath(context_->uid.get()))
- / bf::path(ui->appid);
- app_icon += ".png";
+ / bf::path(ui->appid);
+ if (ui->icon && ui->icon->name)
+ app_icon += bf::path(ui->icon->name).extension();
+ else
+ app_icon += ".png";
bf::path icon_backup = GetBackupPathForIconFile(app_icon);
if (bf::exists(app_icon))
icons_.emplace_back(app_icon, icon_backup);
for (; ui != nullptr; ui = ui->next) {
bf::path app_icon = bf::path(getIconPath(context_->uid.get()))
/ bf::path(ui->appid);
- app_icon += ".png";
+ if (ui->icon && ui->icon->name)
+ app_icon += bf::path(ui->icon->name).extension();
+ else
+ app_icon += ".png";
bf::path icon_backup = GetBackupPathForIconFile(app_icon);
if (bf::exists(icon_backup) || bf::exists(app_icon))
icons_.emplace_back(app_icon, icon_backup);
for (; ui != nullptr; ui = ui->next) {
fs::path app_icon = fs::path(getIconPath(context_->uid.get()))
/ fs::path(ui->appid);
- app_icon += fs::path(".png");
+ if (ui->icon && ui->icon->name)
+ app_icon += fs::path(ui->icon->name).extension();
+ else
+ app_icon += ".png";
if (fs::exists(app_icon)) {
fs::path backup_icon_file = GetBackupPathForIconFile(app_icon);
if (!MoveFile(app_icon, backup_icon_file)) {