Skip to content

Commit 81fd648

Browse files
committed
exmdb: don't ignore result from copy_eml_ext
Even though common_util_copy_message_internal would make a hardlink in the filesystem, the new filename would never be entered into the database and thus not get served. Fixes: gromox-2.20-129-gdde537f36 References: GXH-107
1 parent 49c275e commit 81fd648

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exch/exmdb/common_util.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4693,10 +4693,10 @@ BOOL common_util_check_message_owner(sqlite3 *psqlite,
46934693
return TRUE;
46944694
}
46954695

4696-
static errno_t copy_eml_ext(const char *old_midstr) try
4696+
static errno_t copy_eml_ext(const char *old_midstr, std::string &new_midstr) try
46974697
{
46984698
auto basedir = exmdb_server::get_dir();
4699-
auto new_midstr = fmt::format("{}.{}.{}", time(nullptr), common_util_sequence_ID(), get_host_ID());
4699+
new_midstr = fmt::format("{}.{}.{}", time(nullptr), common_util_sequence_ID(), get_host_ID());
47004700
auto old_eml = fmt::format("{}/eml/{}", basedir, old_midstr);
47014701
auto new_eml = fmt::format("{}/eml/{}", basedir, new_midstr);
47024702
/*
@@ -4767,7 +4767,7 @@ static BOOL common_util_copy_message_internal(sqlite3 *psqlite,
47674767
if (b_private) {
47684768
read_state = pstmt.col_uint64(2);
47694769
if (sqlite3_column_type(pstmt, 3) == SQLITE_NULL ||
4770-
copy_eml_ext(pstmt.col_text(3)) != 0)
4770+
copy_eml_ext(pstmt.col_text(3), mid_string) != 0)
47714771
mid_string.clear();
47724772
}
47734773

0 commit comments

Comments
 (0)