Index: ps/trunk/source/lib/sysdep/filesystem.h =================================================================== --- ps/trunk/source/lib/sysdep/filesystem.h +++ ps/trunk/source/lib/sysdep/filesystem.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -99,13 +99,6 @@ // -// stdio.h -// - -LIB_API int wrename(const OsPath& pathnameOld, const OsPath& pathnameNew); - - -// // stdlib.h // Index: ps/trunk/source/lib/sysdep/os/win/wposix/wfilesystem.cpp =================================================================== --- ps/trunk/source/lib/sysdep/os/win/wposix/wfilesystem.cpp +++ ps/trunk/source/lib/sysdep/os/win/wposix/wfilesystem.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -303,12 +303,6 @@ } -int wrename(const OsPath& pathnameOld, const OsPath& pathnameNew) -{ - return _wrename(OsString(pathnameOld).c_str(), OsString(pathnameNew).c_str()); -} - - OsPath wrealpath(const OsPath& pathname) { wchar_t resolved[PATH_MAX]; Index: ps/trunk/source/ps/VisualReplay.cpp =================================================================== --- ps/trunk/source/ps/VisualReplay.cpp +++ ps/trunk/source/ps/VisualReplay.cpp @@ -22,6 +22,7 @@ #include "lib/timer.h" #include "lib/utf8.h" #include "lib/allocators/shared_ptr.h" +#include "lib/file/file_system.h" #include "lib/external_libraries/libsdl.h" #include "network/NetClient.h" #include "network/NetServer.h" @@ -108,7 +109,7 @@ cacheStream.close(); wunlink(GetCacheFilePath()); - if (wrename(GetTempCacheFilePath(), GetCacheFilePath())) + if (RenameFile(GetTempCacheFilePath(), GetCacheFilePath())) LOGERROR("Could not store the replay cache"); }