Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exec(pinRmCommand, function(error, stdout, stderr) {
storage.remove(pinHash, function(error) {
hashList();
if (error) throw error;
});
if (error !== null) {
console.log('exec error: ' + error);
}
})
}
let reset = () => {
electronStorage.remove('colorpicker')
storage = defaultStorage
save()
}
function openPath(pathName: any, isWatch = false) {
checkWindow();
storage.set("storage.last.path", {file: pathName});
storage.remove("storage.last.file");
let dirFiles: any[] = [];
if (!isWatch) {
chokidar
.watch(pathName, {ignored: /(^|[\/\\])\../})
.on("unlink", () => {
reloadPath(true);
})
.on("add", () => {
reloadPath(true);
});
}
fs.readdir(pathName, (err, files) => {
dirFiles = dirTree(pathName);
new Promise((resolve, reject) => {
storage.remove(key, (err) => {
if (err) {
reject(new Error(`Error removing from storage: ${err}`));
}
resolve();
});
})
);
fs.remove(pathParsed.dir, err => {
if (err) {
Raven.captureException(err);
Raven.showReportDialog();
}
storage.remove(storename, err => {
if (err) {
Raven.captureException(err);
Raven.showReportDialog();
}
});
db.remove({_id: `img${elem.getAttribute('data-store-name')}`}, {}, (err, numRemoved) => {
if (err) {
Raven.captureException(err);
Raven.showReportDialog();
}
log.info(`VIEWER: removed ${numRemoved} from DB`);
});
elem.parentNode.removeChild(elem);
});
}, dismiss => {
}, response => {
if (response === 0) {
shell.openExternal('https://matthewgonzalez.github.io/what-the-port/')
} else if (response === 1) {
storage.remove('ignoreVersion')
} else if (response === 2) {
storage.set('ignoreVersion', update.tag_name)
}
})
}
const time = 0;
const duration = data.duration;
const percent = (time / duration) * 100;
figcap[1].style.width = percent + '%';
figcap[1].style.zIndex = 9999;
figcap[1].style.position = 'relative';
figcap[1].style.top = '0';
figcap[1].style.marginTop = '0px';
figcap[1].style.marginBottom = '0px';
figcap[1].style.setProperty('margin', '0px 0px', 'important');
figcap[1].style.backgroundColor = 'red';
figcap[1].style.width = '0px';
figcap[2].innerText = `${figcap[0].title}`;
log.info(`VIEWER: Reset watched time for ${filename}`);
});
storage.remove(filename, err => {
if (err) {
Raven.captureException(err);
Raven.showReportDialog();
}
});
}
return new Promise((resolve, reject) => {
storage.remove(key, err => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
}