Commit 69aea682 authored by yann300's avatar yann300

don't confirm if not needed

parent c8ed134f
...@@ -19,21 +19,23 @@ module.exports = function (filesProviders) { ...@@ -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) }) 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]) {
if (typeof resp[key] !== 'undefined' && obj[key] !== resp[key] && theResult) { confirmDialog((result) => {
console.log('Overwriting', key) if (result) {
filesProviders['browser'].set(key, resp[key]) console.log('Overwriting', key)
} else { filesProviders['browser'].set(key, resp[key])
console.log('add to obj', obj, key) }
filesProviders['browser'].get(key, (error, content) => { })
if (error) { } else {
console.log(error) console.log('add to obj', obj, key)
} else { filesProviders['browser'].get(key, (error, content) => {
obj[key] = content if (error) {
} console.log(error)
}) } else {
} obj[key] = content
}) }
})
}
done++ done++
if (done >= count) { 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