From 894e349ebf11ff138e1c81f01f59a2430042a29b Mon Sep 17 00:00:00 2001 From: Dunedan Date: Sat, 28 Dec 2024 11:59:32 +0100 Subject: [PATCH] Add a deprecation warning for using GetFileMTime() --- source/ps/scripting/JSInterface_VFS.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/ps/scripting/JSInterface_VFS.cpp b/source/ps/scripting/JSInterface_VFS.cpp index 0b2fc1390a..d497987b6a 100644 --- a/source/ps/scripting/JSInterface_VFS.cpp +++ b/source/ps/scripting/JSInterface_VFS.cpp @@ -151,6 +151,10 @@ bool FileExists(const ScriptRequest& rq, const std::wstring& filename) // Return time [seconds since 1970] of the last modification to the specified file. double GetFileMTime(const std::wstring& filename) { + LOGWARNING( + "GetFileMTime() is deprecated and will be removed with the next release. " + "Use CalculateMD5() instead to check if a file got modified." + ); CFileInfo fileInfo; Status err = g_VFS->GetFileInfo(filename, &fileInfo); JS_CHECK_FILE_ERR(err);