Fix: bad errno handling in load session from path
authorDavid Goulet <dgoulet@efficios.com>
Wed, 26 Mar 2014 15:26:15 +0000 (11:26 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 26 Mar 2014 15:26:15 +0000 (11:26 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/config/config.c

index 0e9e1bdc722661c21fb4172b27ba49a593b742ae..e61791b7d03b01eafad109b66f319421bb1f7e16 100644 (file)
@@ -2344,13 +2344,14 @@ int load_session_from_path(const char *path, const char *session_name,
        if (!directory) {
                switch (errno) {
                case ENOTDIR:
-                       ret = -LTTNG_ERR_LOAD_IO_FAIL;
-                       goto end;
+                       /* Try the file loading. */
+                       break;
                case ENOENT:
                        ret = -LTTNG_ERR_LOAD_SESSION_NOENT;
                        goto end;
                default:
-                       break;
+                       ret = -LTTNG_ERR_LOAD_IO_FAIL;
+                       goto end;
                }
        }
        if (directory) {
This page took 0.026217 seconds and 4 git commands to generate.