summaryrefslogtreecommitdiff
path: root/src/utils/specialfolder.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-28 07:34:25 -0700
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-08 13:47:09 +0200
commit12ac98a5375f38a190925ef59bc923318a37fd0f (patch)
tree2695f64d6369edb511d25f83e4d20b42d8b3a593 /src/utils/specialfolder.h
parent8aa84d089e4233e17a6263cb0cf629331e63d051 (diff)
downloadmana-12ac98a5375f38a190925ef59bc923318a37fd0f.tar.gz
mana-12ac98a5375f38a190925ef59bc923318a37fd0f.tar.bz2
mana-12ac98a5375f38a190925ef59bc923318a37fd0f.tar.xz
mana-12ac98a5375f38a190925ef59bc923318a37fd0f.zip
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.
Diffstat (limited to 'src/utils/specialfolder.h')
-rw-r--r--src/utils/specialfolder.h4
1 files changed, 2 insertions, 2 deletions
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 <shlobj.h>
#include <string>
-std::string getSpecialFolderLocation(int folderId);
+std::string getSpecialFolderLocation(const KNOWNFOLDERID &folderId);
#endif
#endif