Point people towards the help when using "pacman -F" or "pacman -F foo".

Signed-off-by: Allan McRae <[email protected]>
---
 src/pacman/files.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/pacman/files.c b/src/pacman/files.c
index fb2f997..5741e45 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_list) {
                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;
 }
 
-- 
2.6.4

Reply via email to