Skip to content

Commit

Permalink
release v0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
phong-et committed Jun 15, 2020
1 parent a5ed4e6 commit 045c1b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions sml.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 045c1b2

Please sign in to comment.