From f52af09b214b664bcd8fbc892cd811741e223400 Mon Sep 17 00:00:00 2001 From: Stan Date: Sun, 14 Aug 2022 17:23:50 +0000 Subject: [PATCH] Fix replay cache creation in non latin folders. IRC: https://irclogs.wildfiregames.com/%230ad-dev/2022-08-14-QuakeNet-%230ad-dev.log Reported by: @AirXonix2 Thread: https://wildfiregames.com/forum/topic/89261-a-new-series-of-bugs/#comment-514734 Discussed with: @vladislavbelov Differential Revision: https://code.wildfiregames.com/D4763 git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@27054 3db68df2-c116-0410-a063-a993310a9797 --- source/lib/file/file_system.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/source/lib/file/file_system.cpp b/source/lib/file/file_system.cpp index 2ce98cf896..71b267afe7 100644 --- a/source/lib/file/file_system.cpp +++ b/source/lib/file/file_system.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2022 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -25,15 +25,13 @@ */ #include "precompiled.h" -#include "lib/file/file_system.h" -#include -#include -#include +#include "lib/file/file_system.h" #include "lib/sysdep/filesystem.h" #include +#include bool DirectoryExists(const OsPath& path) { @@ -200,7 +198,7 @@ Status RenameFile(const OsPath& path, const OsPath& newPath) try { - fs::rename(path.string8(), newPath.string8()); + fs::rename(fs::path(path.string()), fs::path(newPath.string())); } catch (fs::filesystem_error& err) { @@ -220,9 +218,9 @@ Status CopyFile(const OsPath& path, const OsPath& newPath, bool override_if_exis try { if(override_if_exists) - fs::copy_file(path.string8(), newPath.string8(), boost::filesystem::copy_option::overwrite_if_exists); + fs::copy_file(fs::path(path.string()), fs::path(newPath.string()), boost::filesystem::copy_option::overwrite_if_exists); else - fs::copy_file(path.string8(), newPath.string8()); + fs::copy_file(fs::path(path.string()), fs::path(newPath.string())); } catch(fs::filesystem_error& err) { -- 2.11.4.GIT