From 8c23de9f2abc2ec21d4b74785fd175050909176e Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 17 May 2012 19:44:22 +0200 Subject: Opening plug-in directory made more robust If plugin directory doesn't exist, is a file or user has no permissions to access it, the plugins are not loaded. Signed-off-by: Martin Sustrik --- src/ctx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ctx.cpp b/src/ctx.cpp index 063f96c..abe3bb4 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -136,7 +136,7 @@ next: path += "/lib/xs/plugins"; DIR *dp = opendir (path.c_str ()); - if (!dp && errno == ENOENT) + if (!dp && (errno == ENOENT || errno == EACCES || errno == ENOTDIR)) return; errno_assert (dp); -- cgit v1.2.3