|
|
|
@ -954,8 +954,16 @@ const App = memo(() => {
|
|
|
|
pathSep,
|
|
|
|
pathSep,
|
|
|
|
':', // https://github.com/mifi/lossless-cut/issues/631
|
|
|
|
':', // https://github.com/mifi/lossless-cut/issues/631
|
|
|
|
];
|
|
|
|
];
|
|
|
|
const sameAsInputPath = pathNormalize(pathJoin(outputDir, fileName)) === pathNormalize(filePath);
|
|
|
|
const outPath = pathNormalize(pathJoin(outputDir, fileName));
|
|
|
|
return fileName.length > 0 && !invalidChars.some((c) => fileName.includes(c)) && !sameAsInputPath;
|
|
|
|
const sameAsInputPath = outPath === pathNormalize(filePath);
|
|
|
|
|
|
|
|
const windowsMaxPathLength = 259;
|
|
|
|
|
|
|
|
const shouldCheckPathLength = isWindows || isDev;
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
fileName.length > 0
|
|
|
|
|
|
|
|
&& !invalidChars.some((c) => fileName.includes(c))
|
|
|
|
|
|
|
|
&& !sameAsInputPath
|
|
|
|
|
|
|
|
&& (!shouldCheckPathLength || outPath.length < windowsMaxPathLength)
|
|
|
|
|
|
|
|
);
|
|
|
|
}), [outputDir, filePath]);
|
|
|
|
}), [outputDir, filePath]);
|
|
|
|
|
|
|
|
|
|
|
|
const openSendReportDialogWithState = useCallback(async (err) => {
|
|
|
|
const openSendReportDialogWithState = useCallback(async (err) => {
|
|
|
|
|