diff --git a/electron-builder.imex.yml b/electron-builder.imex.yml index d127c8f..07022f3 100644 --- a/electron-builder.imex.yml +++ b/electron-builder.imex.yml @@ -26,7 +26,6 @@ nsis: shortcutName: ${productName} uninstallDisplayName: ${productName} createDesktopShortcut: always - perMachine: true # Ensure elevated privileges include: "scripts/installer.nsh" # Reference NSIS script from scripts directory mac: entitlementsInherit: build/entitlements.mac.plist diff --git a/electron-builder.rome.yml b/electron-builder.rome.yml index 89a7342..958819d 100644 --- a/electron-builder.rome.yml +++ b/electron-builder.rome.yml @@ -26,7 +26,6 @@ nsis: shortcutName: ${productName} uninstallDisplayName: ${productName} createDesktopShortcut: always - perMachine: true # Ensure elevated privileges include: "scripts/installer.nsh" # Reference NSIS script from scripts directory mac: entitlementsInherit: build/entitlements.mac.plist diff --git a/src/main/ipc/paintScaleHandlers/PPG.ts b/src/main/ipc/paintScaleHandlers/PPG.ts index 54d46c6..da66331 100644 --- a/src/main/ipc/paintScaleHandlers/PPG.ts +++ b/src/main/ipc/paintScaleHandlers/PPG.ts @@ -53,7 +53,8 @@ export async function ppgInputHandler(config: PaintScaleConfig): Promise { await parseStringPromise(xmlContent); } catch (error) { log.error(`Invalid XML in ${filePath}:`, error); - const errorPath = path.join(errorDir, path.basename(filePath)); + const timestamp = Date.now().toString(); // similar to DateTime.Now.Ticks in C# + const errorPath = path.join(errorDir, `${timestamp}.xml`); await fs.rename(filePath, errorPath); log.debug(`Moved invalid file to error: ${errorPath}`); continue; @@ -92,7 +93,8 @@ export async function ppgInputHandler(config: PaintScaleConfig): Promise { if (response.status === 200) { log.info(`Successful upload of ${filePath}`); // Move file to archive - const archivePath = path.join(archiveDir, path.basename(filePath)); + const timestamp = Date.now().toString(); // generate new timestamp + const archivePath = path.join(archiveDir, `${timestamp}.xml`); await fs.rename(filePath, archivePath); log.debug(`Moved file to archive: ${archivePath}`); } else {