lib/maildir: use mv for moving to avoid warnings

using gio gives some (false, we assume) valgrind warnings, so for now
use 'mv' instead.

Also slightly update the code with some mu_format overtaking format.
This commit is contained in:
Dirk-Jan C. Binnema
2023-07-10 23:13:53 +03:00
parent 18490a818d
commit f3bfdf5add
2 changed files with 51 additions and 26 deletions

View File

@ -80,15 +80,15 @@ Result<void> maildir_clear_links(const std::string& dir);
*
* @param oldpath an absolute file system path to an existing message in an
* actual maildir
* @param newpath the absolete full path to the target file
* @param force_gio force the use of GIO for moving; this is done automatically
* when needed; forcing is mostly useful for tests
* @param newpath the absolute full path to the target file
* @param assume_remote assume the target is on a different file-system,
* and hence rename() won't work and we need another method (this is for testing)
*
* @return a valid result (!!result) or an Error
* @return a valid result or an Error
*/
Result<void> maildir_move_message(const std::string& oldpath,
const std::string& newpath,
bool force_gio = false);
bool assume_remote = false);
/**
* Determine the target path for a to-be-moved message; i.e. this does not