Fixed a regression in output file name generation.
This commit is contained in:
parent
0012af66a7
commit
c90c2fab0f
@ -497,13 +497,13 @@ int ProcessThread::generateOutFileName(QString &outFileName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Generate final name
|
//Generate final name
|
||||||
for (int n = 2; n <= 99999; ++n)
|
const QFileInfo origFileName(outFileName);
|
||||||
|
for (int n = 2; n <= 65534; ++n)
|
||||||
{
|
{
|
||||||
//Check file existence
|
//Check file existence
|
||||||
QFileInfo outFileInfo(outFileName);
|
if (QFileInfo(outFileName).exists())
|
||||||
if (outFileInfo.exists())
|
|
||||||
{
|
{
|
||||||
outFileName = QString("%1/%2 (%3).%4").arg(outFileInfo.canonicalPath(), outFileInfo.completeBaseName(), QString::number(n), outFileInfo.suffix());
|
outFileName = origFileName.absoluteDir().filePath(QString("%1 (%2).%3").arg(origFileName.completeBaseName(), QString::number(n), origFileName.suffix()));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user