Fix EMF argument handling to preserve existing args

- Change from assignment to append for inputArgs and outputArgs in EMF handling
- Addresses Sourcery AI feedback about potential argument override
- Ensures compatibility with other file type conversions (e.g., SVG)
This commit is contained in:
radhakrishnan
2025-07-22 20:37:40 +05:30
committed by Emrik Östling
parent 0e94fe354f
commit dd9d117ab8

View File

@@ -463,8 +463,8 @@ export function convert(
// Handle EMF files specifically to avoid LibreOffice delegate issues
if (fileType === "emf") {
// Use direct conversion without delegates for EMF files
inputArgs = ["-define", "emf:delegate=false", "-density", "300"];
outputArgs = ["-background", "white", "-alpha", "remove"];
inputArgs.push("-define", "emf:delegate=false", "-density", "300");
outputArgs.push("-background", "white", "-alpha", "remove");
}
return new Promise((resolve, reject) => {