diff --git a/README.md b/README.md index acd2bca..72f2626 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ node sync -wl BANANA -w3w -o # Change log All notable changes to this project will be documented in this part. +## [0.0.6] +### Fixed bugs +- Fixed program is stopped by deleting file not found +- Final Report list WLs are updated images to Error list ## [0.0.5] ### Fixed bugs - Uppercase whitelabel name diff --git a/sml.js b/sml.js index afe9e65..ac38bf7 100644 --- a/sml.js +++ b/sml.js @@ -100,7 +100,7 @@ async function saveFile(fileName, content) { async function deleteFile(fileName) { return new Promise((resolve, reject) => { fs.unlink(fileName, function (err) { - if (err) reject(err) + if (err) log(err) resolve(true) }) }) @@ -538,7 +538,7 @@ async function downloadFilesSyncWhile(imagePaths, host, syncFolder) { } async function syncImagesOneWLSafely({ whiteLabelName, isSyncWholeFolder, index, cliDomain, isQuickDownload }) { whiteLabelName = whiteLabelName.toUpperCase().trim() - let status + let status = true if (await getDHNumber(whiteLabelName) === undefined) { log('White label %s don\'t exist', whiteLabelName) return @@ -573,10 +573,8 @@ async function syncImagesOneWLSafely({ whiteLabelName, isSyncWholeFolder, index, await downloadFilesSyncFor(paths, host, syncFolder) else await downloadFilesSyncWhile(paths, host, syncFolder) - else { + else log(cliColor.green('√ All files are latest')) - status = true - } } } cleanEmptyFoldersRecursively(cfg.rootFolderImages + 'Images_WLs\\' + syncFolder)