[vlc-commits] [Git][videolan/vlc][3.0.x] win32: dirs: do not create some system folders on behalf of the user

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Dec 14 22:05:58 UTC 2025



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
e688e443 by Steve Lhomme at 2025-12-14T22:25:07+01:00
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

- - - - -


2 changed files:

- NEWS
- src/win32/dirs.c


Changes:

=====================================
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:
 ----------------------------------
 


=====================================
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;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e688e44321ba33febfd2712d93d2d31da2b242b6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e688e44321ba33febfd2712d93d2d31da2b242b6
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list