mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-31 21:21:52 +00:00
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
Block a user