Fix: replace 1 for true in libxml checking
[lttng-tools.git] / src / common / config / config.c
index 722904772316c0fc0b48f548817a472e051247a1..e61791b7d03b01eafad109b66f319421bb1f7e16 100644 (file)
@@ -2342,7 +2342,14 @@ int load_session_from_path(const char *path, const char *session_name,
 
        directory = opendir(path);
        if (!directory) {
-               if (errno != ENOTDIR) {
+               switch (errno) {
+               case ENOTDIR:
+                       /* Try the file loading. */
+                       break;
+               case ENOENT:
+                       ret = -LTTNG_ERR_LOAD_SESSION_NOENT;
+                       goto end;
+               default:
                        ret = -LTTNG_ERR_LOAD_IO_FAIL;
                        goto end;
                }
This page took 0.025091 seconds and 5 git commands to generate.