From 12ac98a5375f38a190925ef59bc923318a37fd0f Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 28 Mar 2024 07:34:25 -0700 Subject: Windows: Modernize getSpecialFolderLocation Ported from CSIDL to newer FOLDERID API and used wcstombs_s to convert the returned path to a multi-byte string. Fixes issues when the Windows username contains special characters. --- src/utils/specialfolder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils/specialfolder.h') diff --git a/src/utils/specialfolder.h b/src/utils/specialfolder.h index 411752a2..8570d009 100644 --- a/src/utils/specialfolder.h +++ b/src/utils/specialfolder.h @@ -1,6 +1,6 @@ /* * The Mana Client - * Copyright (C) 2010-2012 The Mana Developers + * Copyright (C) 2010-2024 The Mana Developers * * This file is part of The Mana Client. * @@ -24,7 +24,7 @@ #ifdef _WIN32 #include #include -std::string getSpecialFolderLocation(int folderId); +std::string getSpecialFolderLocation(const KNOWNFOLDERID &folderId); #endif #endif -- cgit v1.2.3-70-g09d2