* mu-maildir, mu-util: error when source, target of move are the same

This commit is contained in:
Dirk-Jan C. Binnema 2011-08-16 00:08:35 +03:00
parent c2507b33cc
commit ade551deb9
2 changed files with 3 additions and 2 deletions

View File

@ -828,7 +828,7 @@ mu_maildir_move_message (const char* oldpath, const char* targetmdir,
}
if (g_strcmp0 (oldpath, newfullpath) == 0) {
g_set_error (err, 0, MU_ERROR_FILE,
g_set_error (err, 0, MU_ERROR_FILE_TARGET_EQUALS_SOURCE,
"target equals source");
return FALSE;
}

View File

@ -441,7 +441,8 @@ enum _MuError {
MU_ERROR_FILE_STAT_FAILED = 77,
MU_ERROR_FILE_READDIR_FAILED = 78,
MU_ERROR_FILE_INVALID_SOURCE = 79,
MU_ERROR_FILE_TARGET_EQUALS_SOURCE = 80,
/* not really an error, used in callbacks */
MU_STOP = 99,
};