Inline 2
This commit is contained in:
parent
07fa5cb83d
commit
1ffa905f99
|
@ -1110,7 +1110,7 @@ class ExportService {
|
||||||
file,
|
file,
|
||||||
);
|
);
|
||||||
await ensureElectron().saveStreamToDisk(
|
await ensureElectron().saveStreamToDisk(
|
||||||
getFileExportPath(collectionExportPath, imageExportName),
|
`${collectionExportPath}/${imageExportName}`,
|
||||||
imageStream,
|
imageStream,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1122,12 +1122,12 @@ class ExportService {
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
await ensureElectron().saveStreamToDisk(
|
await ensureElectron().saveStreamToDisk(
|
||||||
getFileExportPath(collectionExportPath, videoExportName),
|
`${collectionExportPath}/${videoExportName}`,
|
||||||
videoStream,
|
videoStream,
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await ensureElectron().deleteFile(
|
await ensureElectron().deleteFile(
|
||||||
getFileExportPath(collectionExportPath, imageExportName),
|
`${collectionExportPath}/${imageExportName}`,
|
||||||
);
|
);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
@ -1192,8 +1192,3 @@ class ExportService {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new ExportService();
|
export default new ExportService();
|
||||||
|
|
||||||
export const getFileExportPath = (
|
|
||||||
collectionExportPath: string,
|
|
||||||
fileExportName: string,
|
|
||||||
) => `${collectionExportPath}/${fileExportName}`;
|
|
||||||
|
|
Loading…
Reference in a new issue