mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 10:22:31 +01:00
improve concat output filename extension handling
This commit is contained in:
parent
7abc292d37
commit
98ff495e10
@ -77,7 +77,10 @@ const ConcatDialog = memo(({
|
||||
return;
|
||||
}
|
||||
const ext = getOutFileExtension({ isCustomFormatSelected, outFormat: fileFormat, filePath: firstPath });
|
||||
setOutFileName(getSuffixedFileName(firstPath, `merged-${uniqueSuffix}${ext}`));
|
||||
setOutFileName((existingOutputName) => {
|
||||
if (existingOutputName == null) return getSuffixedFileName(firstPath, `merged-${uniqueSuffix}${ext}`);
|
||||
return existingOutputName.replace(/(\.[^.]*)?$/, ext); // make sure the last (optional) .* is replaced by .ext`
|
||||
});
|
||||
}, [fileFormat, firstPath, isCustomFormatSelected, uniqueSuffix]);
|
||||
|
||||
const allFilesMeta = useMemo(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user