Fix paste deleted file error not translated issue, link to bug#121093.

This commit is contained in:
HeMeihong 2022-08-30 10:06:53 +08:00 committed by Yue-Lan
parent 2fe6d1c3f4
commit cf24a12a3c
2 changed files with 11 additions and 1 deletions

View File

@ -369,9 +369,11 @@ fallback_retry:
except.errorStr = err->message;
except.destDirUri = m_current_dest_dir_uri;
//
//fix bug#121093, paste deleted file issue
if (err->code == G_IO_ERROR_PERMISSION_DENIED) {
except.errorStr = tr("Cannot opening file, permission denied!");
}else if (err->code == G_IO_ERROR_NOT_FOUND) {
except.errorStr = tr("File:%1 was not found.").arg(except.srcUri);
}
if (handle_type == Other) {

View File

@ -817,6 +817,14 @@ fallback_retry:
except.title = tr("Create file error");
except.srcUri = m_current_src_uri;
except.destDirUri = m_current_dest_dir_uri;
//fix bug#121093, paste deleted file issue
if (err->code == G_IO_ERROR_PERMISSION_DENIED) {
except.errorStr = tr("Cannot opening file, permission denied!");
}else if (err->code == G_IO_ERROR_NOT_FOUND) {
except.errorStr = tr("File:%1 was not found.").arg(except.srcUri);
}
if (handle_type == Other) {
auto typeData = Invalid;
if (G_IO_ERROR_EXISTS == err->code) {