|
|
@ -353,7 +353,6 @@ var pEpHdrView = { |
|
|
|
let dotPos = name.lastIndexOf("."); |
|
|
|
let tryAppend = 1; |
|
|
|
let newName; |
|
|
|
let found; |
|
|
|
do { |
|
|
|
tryAppend++; |
|
|
|
if (dotPos < 0) { |
|
|
@ -361,14 +360,7 @@ var pEpHdrView = { |
|
|
|
} else { |
|
|
|
newName = `${name.substring(0, dotPos)}(${tryAppend})${name.substring(dotPos)}`; |
|
|
|
} |
|
|
|
found = false; |
|
|
|
for (let k = 0; k < attLength; k++) { |
|
|
|
if (newName == attachmentNames[k]) { |
|
|
|
found = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} while (found); |
|
|
|
} while (attachmentNames.includes(newName)); |
|
|
|
|
|
|
|
attachmentNames[j] = newName; |
|
|
|
this.win.currentAttachments[j].name = newName; |
|
|
|