Skip to content

Commit eee2b6f

Browse files
committed
coderabbitai
1 parent 5aea9f6 commit eee2b6f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

msgcntr/messageforums-app/src/java/org/sakaiproject/tool/messageforums/ForumsEmailService.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,13 @@ public void send() {
249249
if (attachmentList != null && reply.getTopic().getIncludeContentsInEmails()) {
250250
// Clean up temporary files that were created for email attachments
251251
if (prefixedPath != null && !"".equals(prefixedPath)) {
252-
StringBuilder sbPrefixedPath;
253252
Iterator<Attachment> iter = attachmentList.iterator();
254253
while (iter.hasNext()) {
255-
sbPrefixedPath = new StringBuilder(prefixedPath);
256-
sbPrefixedPath.append("email_tmp");
257254
a = (Attachment) iter.next();
258-
deleteAttachedFile(sbPrefixedPath.append(
259-
a.getAttachmentId()).toString());
255+
StringBuilder filePath = new StringBuilder(prefixedPath);
256+
filePath.append("/email_tmp/");
257+
filePath.append(a.getAttachmentId().replace('\\', '/'));
258+
deleteAttachedFile(filePath.toString());
260259
}
261260
}
262261
}

0 commit comments

Comments
 (0)