[Base] Removed useless path_to_utf8 conversion while using fmt

Default filesystem::path formatter was added to fmt around 2022
This commit is contained in:
Gliniak
2024-12-13 19:04:31 +01:00
parent 3318ab5d4c
commit a295ec1bbd
18 changed files with 55 additions and 78 deletions

View File

@@ -18,8 +18,7 @@ namespace vfs {
std::unique_ptr<Device> XContentContainerDevice::CreateContentDevice(
const std::string_view mount_path, const std::filesystem::path& host_path) {
if (!std::filesystem::exists(host_path)) {
XELOGE("Path to XContent container does not exist: {}",
xe::path_to_utf8(host_path));
XELOGE("Path to XContent container does not exist: {}", host_path);
return nullptr;
}
@@ -75,8 +74,7 @@ XContentContainerDevice::~XContentContainerDevice() {}
bool XContentContainerDevice::Initialize() {
if (!std::filesystem::exists(host_path_)) {
XELOGE("Path to XContent container does not exist: {}",
xe::path_to_utf8(host_path_));
XELOGE("Path to XContent container does not exist: {}", host_path_);
return false;
}
@@ -84,7 +82,7 @@ bool XContentContainerDevice::Initialize() {
return false;
}
XELOGI("Loading XContent header file: {}", xe::path_to_utf8(host_path_));
XELOGI("Loading XContent header file: {}", host_path_);
auto header_file = xe::filesystem::OpenFile(host_path_, "rb");
if (!header_file) {
XELOGE("Error opening XContent header file.");

View File

@@ -34,7 +34,7 @@ SvodContainerDevice::Result SvodContainerDevice::LoadHostFiles(
data_fragment_path += ".data";
if (!std::filesystem::exists(data_fragment_path)) {
XELOGE("STFS container is multi-file, but path {} does not exist.",
xe::path_to_utf8(data_fragment_path));
data_fragment_path);
return Result::kFileMismatch;
}
@@ -57,7 +57,7 @@ SvodContainerDevice::Result SvodContainerDevice::LoadHostFiles(
auto path = fragment.path / fragment.name;
auto file = xe::filesystem::OpenFile(path, "rb");
if (!file) {
XELOGI("Failed to map SVOD file {}.", xe::path_to_utf8(path));
XELOGI("Failed to map SVOD file {}.", path);
CloseFiles();
return Result::kReadError;
}

View File

@@ -32,7 +32,7 @@ DEFINE_transient_path(dump_path, "",
int vfs_dump_main(const std::vector<std::string>& args) {
if (cvars::source.empty() || cvars::dump_path.empty()) {
XELOGE("Usage: {} [source] [dump_path]", xe::path_to_utf8(args[0]));
XELOGE("Usage: {} [source] [dump_path]", args[0]);
return 1;
}