Commit 69aea682 authored by yann300's avatar yann300

don't confirm if not needed

parent c8ed134f
......@@ -19,21 +19,23 @@ module.exports = function (filesProviders) {
modalDialogCustom.confirm('', 'Overwrite "' + key + '"? Click Ok to overwrite local file with file from cloud. Cancel will push your local file to the cloud.', () => { callback(true) }, () => { callback(false) })
}
confirmDialog(function (theResult) {
if (typeof resp[key] !== 'undefined' && obj[key] !== resp[key] && theResult) {
console.log('Overwriting', key)
filesProviders['browser'].set(key, resp[key])
} else {
console.log('add to obj', obj, key)
filesProviders['browser'].get(key, (error, content) => {
if (error) {
console.log(error)
} else {
obj[key] = content
}
})
}
})
if (typeof resp[key] !== 'undefined' && obj[key] !== resp[key]) {
confirmDialog((result) => {
if (result) {
console.log('Overwriting', key)
filesProviders['browser'].set(key, resp[key])
}
})
} else {
console.log('add to obj', obj, key)
filesProviders['browser'].get(key, (error, content) => {
if (error) {
console.log(error)
} else {
obj[key] = content
}
})
}
done++
if (done >= count) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment