@@ -190,8 +190,8 @@ public async Task InitAsync(PluginInitContext context)
190
190
var _uwpsCount = 0 ;
191
191
await Stopwatch . NormalAsync ( "|Flow.Launcher.Plugin.Program.Main|Preload programs cost" , async ( ) =>
192
192
{
193
- var pluginCachePath = Context . CurrentPluginMetadata . PluginCacheDirectoryPath ;
194
- FilesFolders . ValidateDirectory ( pluginCachePath ) ;
193
+ var pluginCacheDirectory = Context . CurrentPluginMetadata . PluginCacheDirectoryPath ;
194
+ FilesFolders . ValidateDirectory ( pluginCacheDirectory ) ;
195
195
196
196
static void MoveFile ( string sourcePath , string destinationPath )
197
197
{
@@ -237,19 +237,19 @@ static void MoveFile(string sourcePath, string destinationPath)
237
237
238
238
// Move old cache files to the new cache directory
239
239
var oldWin32CacheFile = Path . Combine ( DataLocation . CacheDirectory , $ "{ Win32CacheName } .cache") ;
240
- var newWin32CacheFile = Path . Combine ( pluginCachePath , $ "{ Win32CacheName } .cache") ;
240
+ var newWin32CacheFile = Path . Combine ( pluginCacheDirectory , $ "{ Win32CacheName } .cache") ;
241
241
MoveFile ( oldWin32CacheFile , newWin32CacheFile ) ;
242
242
var oldUWPCacheFile = Path . Combine ( DataLocation . CacheDirectory , $ "{ UwpCacheName } .cache") ;
243
- var newUWPCacheFile = Path . Combine ( pluginCachePath , $ "{ UwpCacheName } .cache") ;
243
+ var newUWPCacheFile = Path . Combine ( pluginCacheDirectory , $ "{ UwpCacheName } .cache") ;
244
244
MoveFile ( oldUWPCacheFile , newUWPCacheFile ) ;
245
245
246
246
await _win32sLock . WaitAsync ( ) ;
247
- _win32s = await context . API . LoadCacheBinaryStorageAsync ( Win32CacheName , pluginCachePath , new List < Win32 > ( ) ) ;
247
+ _win32s = await context . API . LoadCacheBinaryStorageAsync ( Win32CacheName , pluginCacheDirectory , new List < Win32 > ( ) ) ;
248
248
_win32sCount = _win32s . Count ;
249
249
_win32sLock . Release ( ) ;
250
250
251
251
await _uwpsLock . WaitAsync ( ) ;
252
- _uwps = await context . API . LoadCacheBinaryStorageAsync ( UwpCacheName , pluginCachePath , new List < UWPApp > ( ) ) ;
252
+ _uwps = await context . API . LoadCacheBinaryStorageAsync ( UwpCacheName , pluginCacheDirectory , new List < UWPApp > ( ) ) ;
253
253
_uwpsCount = _uwps . Count ;
254
254
_uwpsLock . Release ( ) ;
255
255
} ) ;
0 commit comments