diff --git a/src/util/virhook.c b/src/util/virhook.c index d1ac518c24..119ad1aae6 100644 --- a/src/util/virhook.c +++ b/src/util/virhook.c @@ -172,9 +172,9 @@ virHookCheck(int no, const char *driver) dir_path = g_strdup_printf("%s.d", path); - if (!virFileIsExecutable(dir_path)) { + if (!virFileIsExecutable(dir_path) && errno != EISDIR) { VIR_DEBUG("Hook dir %s is not accessible", dir_path); - return 1; + return 0; } if ((ret = virDirOpenIfExists(&dir, dir_path)) < 0) @@ -422,9 +422,6 @@ virHookCall(int driver, dir_path = g_strdup_printf("%s.d", path); - if (!virFileIsExecutable(dir_path)) - return script_ret; - if ((ret = virDirOpenIfExists(&dir, dir_path)) < 0) return -1;