[vlc-devel] [PATCH 9/9] win32: dirs-uap: use the LocalFolder when we can't get LocalCacheFolder

Steve Lhomme robux4 at ycbcr.xyz
Mon Apr 6 13:35:07 CEST 2020


It's better than nothing. It will be backep up.
---
 src/win32/dirs-uap.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/win32/dirs-uap.c b/src/win32/dirs-uap.c
index eb871445e9d..ff858ffa6df 100644
--- a/src/win32/dirs-uap.c
+++ b/src/win32/dirs-uap.c
@@ -221,11 +221,9 @@ end_appdata:
     return psz_dir;
 }
 
+#ifdef HAVE_IAPPLICATIONDATA2
 static char *config_GetCacheDir (void)
 {
-#ifndef HAVE_IAPPLICATIONDATA2
-    return NULL;
-#else // HAVE_IAPPLICATIONDATA2
     IStorageFolder *folder = NULL;
     IApplicationDataStatics *appDataStatics = NULL;
     IApplicationData *appData = NULL;
@@ -280,8 +278,8 @@ end_appdata:
         return NULL;
 
     return GetFolderName(folder);
-#endif // HAVE_IAPPLICATIONDATA2
 }
+#endif // HAVE_IAPPLICATIONDATA2
 
 char *config_GetUserDir (vlc_userdir_t type)
 {
@@ -298,7 +296,11 @@ char *config_GetUserDir (vlc_userdir_t type)
         case VLC_USERDATA_DIR:
             return config_GetAppDir ();
         case VLC_CACHE_DIR:
+#ifdef HAVE_IAPPLICATIONDATA2
             return config_GetCacheDir ();
+#else // !HAVE_IAPPLICATIONDATA2
+            return config_GetAppDir();
+#endif // !HAVE_IAPPLICATIONDATA2
         case VLC_MUSIC_DIR:
             return config_GetShellDir (VLC_MUSIC_DIR);
         case VLC_PICTURES_DIR:
-- 
2.17.1



More information about the vlc-devel mailing list