fix copyDir for FreeBSD and add debug message

This commit is contained in:
crazywhalecc
2023-10-15 15:45:34 +08:00
committed by Jerry Ma
parent 243ee63283
commit 39fe6fa081
2 changed files with 6 additions and 2 deletions

View File

@@ -59,9 +59,12 @@ class SourceExtractor
}
// check source dir exist
$check = $lock[$source]['move_path'] === null ? SOURCE_PATH . '/' . $source : SOURCE_PATH . '/' . $lock[$source]['move_path'];
$check = $lock[$source]['move_path'] === null ? (SOURCE_PATH . '/' . $source) : (SOURCE_PATH . '/' . $lock[$source]['move_path']);
if (!is_dir($check)) {
logger()->debug('Extracting source [' . $source . '] to ' . $check . ' ...');
FileSystem::extractSource($source, DOWNLOAD_PATH . '/' . ($lock[$source]['filename'] ?? $lock[$source]['dirname']), $lock[$source]['move_path']);
} else {
logger()->debug('Source [' . $source . '] already extracted in ' . $check . ', skip !');
}
}
}