* mu-maildir, mu-util: error when source, target of move are the same
This commit is contained in:
@ -828,7 +828,7 @@ mu_maildir_move_message (const char* oldpath, const char* targetmdir,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_strcmp0 (oldpath, newfullpath) == 0) {
|
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");
|
"target equals source");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -441,7 +441,8 @@ enum _MuError {
|
|||||||
MU_ERROR_FILE_STAT_FAILED = 77,
|
MU_ERROR_FILE_STAT_FAILED = 77,
|
||||||
MU_ERROR_FILE_READDIR_FAILED = 78,
|
MU_ERROR_FILE_READDIR_FAILED = 78,
|
||||||
MU_ERROR_FILE_INVALID_SOURCE = 79,
|
MU_ERROR_FILE_INVALID_SOURCE = 79,
|
||||||
|
MU_ERROR_FILE_TARGET_EQUALS_SOURCE = 80,
|
||||||
|
|
||||||
/* not really an error, used in callbacks */
|
/* not really an error, used in callbacks */
|
||||||
MU_STOP = 99,
|
MU_STOP = 99,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user