summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fr-command-rar.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/fr-command-rar.c b/src/fr-command-rar.c
index 3602e29..e2eb8df 100644
--- a/src/fr-command-rar.c
+++ b/src/fr-command-rar.c
@@ -687,18 +687,10 @@ fr_command_rar_handle_error (FrCommand *comm,
for (scan = g_list_last (comm->process->err.raw); scan; scan = scan->prev) {
char *line = scan->data;
- if (strstr (line, "password incorrect") != NULL) {
- error->type = FR_PROC_ERROR_ASK_PASSWORD;
- break;
- }
-
- if (strstr (line, "password is incorrect") != NULL) {
- error->type = FR_PROC_ERROR_ASK_PASSWORD;
- break;
- }
-
- if (strstr (line, "wrong password") != NULL)
- {
+ if ((strstr (line, "Incorrect password") != NULL) ||
+ (strstr (line, "password incorrect") != NULL) ||
+ (strstr (line, "password is incorrect") != NULL) ||
+ (strstr (line, "wrong password") != NULL)) {
error->type = FR_PROC_ERROR_ASK_PASSWORD;
break;
}