LOGD("Add file : %s, len : %d", file_name.c_str(), file_len);
total_file_count_in_group++;
} else {
- LOGD("Delete file : %s, len : %d", file_name.c_str(), file_len);
+ char *app_id = NULL;
+ char file_path[PATH_MAX];
+ char del_path[PATH_MAX];
+ std::size_t found = file_name.find_last_of("/");
+ string del_file_name = file_name.substr(found+1);
+ char *data_path = app_get_shared_data_path();
+ app_get_id(&app_id);
+ snprintf(file_path, sizeof(file_path), "%s/%s", data_path, del_file_name.c_str());
+ snprintf(del_path, sizeof(del_path), "%s/%s%s",STICKER_DIRECTORY, app_id, file_path);
+
+ LOGD("Delete file : %s, len : %d", del_path, file_len);
if (create_sticker_provider_handle() == STICKER_ERROR_NONE) {
- delete_sticker_data(file_name.c_str());
+ delete_sticker_data(del_path);
destroy_sticker_provider_handle();
}
+
+ if (app_id)
+ free(app_id);
}
}
}