aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-10-29 22:13:25 +0100
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-10-29 22:35:39 +0100
commitecb6f0935225d9c80e56ed71fbdb00180b7e79d3 (patch)
tree116441dc794cd402bffac406c60001cda4b46fc3
parent91f83f707059d6e740202b09a685be9a7335fc12 (diff)
downloadpaludis-ecb6f0935225d9c80e56ed71fbdb00180b7e79d3.tar.gz
paludis-ecb6f0935225d9c80e56ed71fbdb00180b7e79d3.tar.xz
Uncaught exception in 'paludis --executables openssh'
Unhandled exception: * In program /usr/bin/paludis --executables openssh * When performing executables action from command line: * When handling query 'openssh': * When calling stat() on '/etc/skel/.ssh/.keep_net-misc_openssh-0': * Error running stat() on '/etc/skel/.ssh/.keep_net-misc_openssh-0': Permission denied * (paludis::FSError)
-rw-r--r--src/clients/paludis/do_executables.cc33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/clients/paludis/do_executables.cc b/src/clients/paludis/do_executables.cc
index c7902ad..29cd099 100644
--- a/src/clients/paludis/do_executables.cc
+++ b/src/clients/paludis/do_executables.cc
@@ -42,24 +42,33 @@ namespace
bool is_file_in_path(FSEntry file)
{
- if (file.exists())
+ try
{
- if (file.has_permission(fs_ug_others, fs_perm_execute))
+ if (file.exists())
{
- FSEntry dirname(file.dirname());
- for (std::list<std::string>::const_iterator it(_paths.begin()),
- it_end(_paths.end()); it_end != it; ++it)
+ if (file.has_permission(fs_ug_others, fs_perm_execute))
{
- if (dirname == *it)
- return true;
+ FSEntry dirname(file.dirname());
+ for (std::list<std::string>::const_iterator it(_paths.begin()),
+ it_end(_paths.end()); it_end != it; ++it)
+ {
+ if (dirname == *it)
+ return true;
+ }
}
}
- } else {
- Context context("When checking permissions on '" + stringify(file) + "'");
- Log::get_instance()->message("do_executables.file_does_not_exist", ll_warning, lc_context)
- << "'" << stringify(file) << "' is listed as installed but does not exist";
+ else
+ {
+ Context context("When checking permissions on '" + stringify(file) + "'");
+ Log::get_instance()->message("do_executables.file_does_not_exist", ll_warning, lc_context)
+ << "'" << stringify(file) << "' is listed as installed but does not exist";
+ }
+ return false;
+ }
+ catch (const FSError & e)
+ {
+ return false;
}
- return false;
}
public: