remote 命令
This commit is contained in:
parent
d05bb4cfe6
commit
ecff0496cb
@ -61,21 +61,24 @@ module.exports = class Remote {
|
|||||||
|
|
||||||
// Get directory contents
|
// Get directory contents
|
||||||
const directoryItems = await this.client.getDirectoryContents("/");
|
const directoryItems = await this.client.getDirectoryContents("/");
|
||||||
|
$logger.info("directoryItems", directoryItems)
|
||||||
// 是否包含 index.json ?
|
// 是否包含 index.json ?
|
||||||
// 不包含尝试创建
|
// 不包含尝试创建
|
||||||
// 包含了尝试下载
|
// 包含了尝试下载
|
||||||
const indexJsonFile = this.getIndexJson( directoryItems );
|
const indexJsonFile = this.getIndexJson( directoryItems );
|
||||||
|
$logger.info("indexJsonFile", indexJsonFile)
|
||||||
if ( indexJsonFile ) {
|
if ( indexJsonFile ) {
|
||||||
// 包含了尝试下载
|
// 包含了尝试下载
|
||||||
// 下载有缓存
|
// 下载有缓存
|
||||||
this.download(indexJsonFile)
|
this.download(indexJsonFile)
|
||||||
|
$logger.info("download index")
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 不包含尝试创建
|
// 不包含尝试创建
|
||||||
await this.affireRemoteStore()
|
await this.affireRemoteStore()
|
||||||
|
$logger.info("affireRemoteStore")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}catch ( e ) {
|
}catch ( e ) {
|
||||||
$logger.error("remote check 过程中出错", e)
|
$logger.error("remote check 过程中出错", e)
|
||||||
|
Loading…
Reference in New Issue
Block a user