summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pacman/files.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pacman/files.c b/src/pacman/files.c
index fb2f997e..3b0b356b 100644
--- a/src/pacman/files.c
+++ b/src/pacman/files.c
@@ -294,7 +294,7 @@ int pacman_files(alpm_list_t *targets)
}
}
- if(targets == NULL && (config->op_s_search || config->op_q_owns)) {
+ if(targets == NULL && (config->op_q_owns | config->op_s_search)) {
pm_printf(ALPM_LOG_ERROR, _("no targets specified (use -h for help)\n"));
return 1;
}
@@ -314,6 +314,11 @@ int pacman_files(alpm_list_t *targets)
return files_list(files_dbs, targets);
}
+ if(targets != NULL) {
+ pm_printf(ALPM_LOG_ERROR, _("no options specified (use -h for help)\n"));
+ return 1;
+ }
+
return 0;
}