Merge pull request 'B2024-021' (#290) from B2024-021 into Development
Code change looks good
This commit is contained in:
commit
cae3e2323d
@ -701,22 +701,24 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (File.Exists(outputFileName))
|
||||
{
|
||||
String tmpExt = System.IO.Path.GetExtension(outputFileName);
|
||||
String tmpPTH = System.IO.Path.GetDirectoryName(outputFileName);
|
||||
String tmpFN = System.IO.Path.GetFileName(outputFileName);
|
||||
String tmpFNNoExt = System.IO.Path.GetFileNameWithoutExtension(outputFileName);
|
||||
|
||||
var files = new HashSet<string>(Directory.GetFiles(tmpPTH, "*.pdf"));
|
||||
//string baseName = Path.Combine(scpath, "Screenshot_");
|
||||
string filename;
|
||||
int i = 0;
|
||||
do
|
||||
if (!BaselineTesting)
|
||||
{
|
||||
filename = tmpPTH + @"\" + tmpFNNoExt + "_" + ++i + ".pdf";
|
||||
} while (files.Contains(filename));
|
||||
String tmpExt = System.IO.Path.GetExtension(outputFileName);
|
||||
String tmpPTH = System.IO.Path.GetDirectoryName(outputFileName);
|
||||
String tmpFN = System.IO.Path.GetFileName(outputFileName);
|
||||
String tmpFNNoExt = System.IO.Path.GetFileNameWithoutExtension(outputFileName);
|
||||
|
||||
outputFileName = filename;
|
||||
var files = new HashSet<string>(Directory.GetFiles(tmpPTH, "*.pdf"));
|
||||
//string baseName = Path.Combine(scpath, "Screenshot_");
|
||||
string filename;
|
||||
int i = 0;
|
||||
do
|
||||
{
|
||||
filename = tmpPTH + @"\" + tmpFNNoExt + "_" + ++i + ".pdf";
|
||||
} while (files.Contains(filename));
|
||||
|
||||
outputFileName = filename;
|
||||
}
|
||||
}
|
||||
|
||||
writer = PdfWriter.GetInstance(document, new FileStream(outputFileName, FileMode.Create));
|
||||
|
Loading…
x
Reference in New Issue
Block a user