Browse Source

win32: dirs: do not create some system folders on behalf of the user

These should not be created by VLC
* VLC_HOME_DIR (%userprofile%\Documents)
* VLC_MUSIC_DIR (%userprofile%\Music)
* VLC_PICTURES_DIR (%userprofile%\Pictures)
* VLC_VIDEOS_DIR (%userprofile%\Videos)
* VLC_DESKTOP_DIR = VLC_HOME_DIR (%userprofile%\Documents)
* VLC_TEMPLATES_DIR = VLC_HOME_DIR (%userprofile%\Documents)
* VLC_PUBLICSHARE_DIR = VLC_HOME_DIR (%userprofile%\Documents)
* VLC_DOCUMENTS_DIR = VLC_HOME_DIR (%userprofile%\Documents)
* VLC_DOWNLOAD_DIR = VLC_HOME_DIR (%userprofile%\Documents)

VLC_VIDEOS_DIR/VLC_MUSIC_DIR/VLC_DOWNLOAD_DIR are used by the es_out.
But if the system doesn't have them or if they are not usable we should not write in them.
The user has the option to set "input-record-path" to set a usable folder.

VLC_PICTURES_DIR is used to save the snapshots and there is "snapshot-path"
to use a different folder.

These should be created by VLC if needed:
* VLC_CONFIG_DIR
* VLC_DATA_DIR
* VLC_CACHE_DIR

But they are not actually created during the config_GetAppDir() call.

Fixes #29488
3.0.x
Steve Lhomme 8 months ago
committed by Jean-Baptiste Kempf
parent
commit
e688e44321
  1. 6
      NEWS
  2. 2
      src/win32/dirs.c

6
NEWS

@ -1,3 +1,9 @@
Changes between 3.0.22 and 3.0.23:
----------------------------------
Windows:
* config_GetUserDir() no longer tries to create the folder on Windows (#29488)
Changes between 3.0.21 and 3.0.22:
----------------------------------

2
src/win32/dirs.c

@ -216,7 +216,7 @@ static char *config_GetShellDir (int csidl)
{
wchar_t wdir[MAX_PATH];
if (SHGetFolderPathW (NULL, csidl | CSIDL_FLAG_CREATE,
if (SHGetFolderPathW (NULL, csidl,
NULL, SHGFP_TYPE_CURRENT, wdir ) == S_OK)
return FromWide (wdir);
return NULL;

Loading…
Cancel
Save