From 3cf7aee6175e45e2dd5b45dcf1319ff668afa74d Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 29 Oct 2017 21:28:05 -1000 Subject: [PATCH] Windows fix --- include/kabufuda/Util.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/kabufuda/Util.hpp b/include/kabufuda/Util.hpp index cfa8a5f..0565aeb 100644 --- a/include/kabufuda/Util.hpp +++ b/include/kabufuda/Util.hpp @@ -318,7 +318,8 @@ static inline int64_t FTell(FILE* fp) static inline int Rename(const SystemChar* oldpath, const SystemChar* newpath) { #if CARD_UCS2 - return _wrename(oldpath, newpath); + //return _wrename(oldpath, newpath); + return ReplaceFileW(newpath, oldpath, nullptr, 0, nullptr, nullptr) == 0; #else return rename(oldpath, newpath); #endif