Commit 8a14c3a0 authored by Thomas's avatar Thomas
Browse files

OUT-789: Take into account files without extension. Remove space.

parent 78a047cf
......@@ -1083,8 +1083,15 @@ namespace pEp
try
{
var fileParts = this.FileName.Split('.');
normalizedFileName = string.Join("", new ArraySegment<string>(fileParts, 0, fileParts.Length - 1));
normalizedFileName += " (" + counter++ + ")." + fileParts.Last();
if (fileParts.Length > 1)
{
normalizedFileName = string.Join("", new ArraySegment<string>(fileParts, 0, fileParts.Length - 1));
normalizedFileName += "(" + counter++ + ")." + fileParts.Last();
}
else
{
normalizedFileName = this.FileName + "(" + counter++ + ")";
}
}
catch (Exception ex)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment