fix download cache problem

This commit is contained in:
crazywhalecc
2023-03-19 14:03:55 +08:00
parent 3c438914c2
commit f06736315d

View File

@@ -229,7 +229,7 @@ class Downloader
public static function fetchSource(string $name, array $source): void public static function fetchSource(string $name, array $source): void
{ {
// 避免重复 fetch // 避免重复 fetch
if (!isset($source['path']) && !is_dir(FileSystem::convertPath(DOWNLOAD_PATH . "/{$name}")) || isset($source['path']) && is_dir(FileSystem::convertPath(SOURCE_PATH . "/{$source['path']}"))) { if (!isset($source['path']) && is_dir(FileSystem::convertPath(DOWNLOAD_PATH . "/{$name}")) || isset($source['path']) && is_dir(FileSystem::convertPath(SOURCE_PATH . "/{$source['path']}"))) {
logger()->notice("{$name} source already extracted"); logger()->notice("{$name} source already extracted");
return; return;
} }