Replace filename chars that cause issues on macOS

This commit is contained in:
Alex Fernandez 2023-07-06 17:40:08 -06:00
parent 1e88124344
commit 73fdf69504
No known key found for this signature in database
GPG key ID: 01A3D4E95D81A9FB

View file

@ -58,7 +58,7 @@ const quickScreenshot = async (
if (image === undefined) {
return { done: false };
}
const fileName = name.replace('/', '-').replace(':', '-');
const fileName = name.replaceAll('/', '-').replaceAll(':', '-');
const dir = path.join(homedir(), `Desktop/Responsively-Screenshots`);
const filePath = path.join(dir, `/${fileName}-${Date.now()}.jpeg`);
await ensureDir(dir);