remote 命令

This commit is contained in:
Cheney 2025-03-13 15:31:16 +08:00
parent d05bb4cfe6
commit ecff0496cb

View File

@ -61,21 +61,24 @@ module.exports = class Remote {
// Get directory contents
const directoryItems = await this.client.getDirectoryContents("/");
$logger.info("directoryItems", directoryItems)
// 是否包含 index.json ?
// 不包含尝试创建
// 包含了尝试下载
const indexJsonFile = this.getIndexJson( directoryItems );
$logger.info("indexJsonFile", indexJsonFile)
if ( indexJsonFile ) {
// 包含了尝试下载
// 下载有缓存
this.download(indexJsonFile)
$logger.info("download index")
} else {
// 不包含尝试创建
await this.affireRemoteStore()
$logger.info("affireRemoteStore")
}
return true
}catch ( e ) {
$logger.error("remote check 过程中出错", e)