#include "common/step/filesystem/step_create_icons.h"
-#include <boost/filesystem/operations.hpp>
-#include <boost/system/error_code.hpp>
#include <pkgmgr-info.h>
+#include <filesystem>
+#include <system_error>
+
#include "common/utils/file_util.h"
#include "common/utils/glist_range.h"
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
+namespace fs = std::filesystem;
namespace common_installer {
namespace filesystem {
if (!extra_icon_path)
return Status::OK;
- bf::path destination = extra_icon_path;
- bs::error_code error;
- if (!bf::exists(destination)) {
- bf::create_directories(destination, error);
+ fs::path destination = extra_icon_path;
+ std::error_code error;
+ if (!fs::exists(destination)) {
+ fs::create_directories(destination, error);
if (error) {
LOG(ERROR) << "Cannot create directory of application icons: "
<< destination;
continue;
icon_x* icon = reinterpret_cast<icon_x*>(app->icon->data);
- bf::path source(icon->text);
- if (!bf::exists(source))
+ fs::path source(icon->text);
+ if (!fs::exists(source))
continue;
- bf::path destination_path = destination / app->appid;
+ fs::path destination_path = destination / app->appid;
if (source.has_extension())
destination_path += source.extension();
else
destination_path += ".png";
- bf::copy_file(source, destination_path,
- bf::copy_option::overwrite_if_exists, error);
+ fs::copy_file(source, destination_path,
+ fs::copy_options::overwrite_existing, error);
if (error) {
LOG(ERROR) << "Cannot create package icon: " << destination_path
<< " , error: " << error;