qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/16] util/win32: simplify qemu_get_local_state_dir()


From: Stefan Weil
Subject: Re: [PATCH 02/16] util/win32: simplify qemu_get_local_state_dir()
Date: Wed, 4 May 2022 20:07:06 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

Am 04.05.22 um 19:30 schrieb marcandre.lureau@redhat.com:

From: Marc-André Lureau <marcandre.lureau@redhat.com>

SHGetFolderPath() is a deprecated API:
https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha

It is a wrapper for SHGetKnownFolderPath() and CSIDL_COMMON_PATH is
mapped to FOLDERID_ProgramData:
https://docs.microsoft.com/en-us/windows/win32/shell/csidl

g_get_system_data_dirs() is a suitable replacement, as it will have
FOLDERID_ProgramData in the returned list. However, it follows the XDG
Base Directory Specification, if `XDG_DATA_DIRS` is defined, it will be
returned instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
  util/oslib-win32.c | 17 ++++-------------
  1 file changed, 4 insertions(+), 13 deletions(-)


Reviewed-by: Stefan Weil <sw@weilnetz.de>


Attachment: OpenPGP_0xE08C21D5677450AD.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]