mirror of https://github.com/jiahaog/Nativefier
Fix inferred file name extension
This commit is contained in:
parent
9a8c18d0a4
commit
3f6f632d51
|
@ -11,9 +11,9 @@ tmp.setGracefulCleanup();
|
|||
* @param {inferIconCallback} callback
|
||||
*/
|
||||
function inferIconFromUrlToPath(targetUrl, outDir, callback) {
|
||||
const outfilePath = path.join(outDir, '/icon.png');
|
||||
pageIcon(targetUrl, {ext: 'png'})
|
||||
.then(icon => {
|
||||
const outfilePath = path.join(outDir, `/icon.${icon.ext}`);
|
||||
fs.writeFile(outfilePath, icon.data, error => {
|
||||
callback(error, outfilePath);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue