cli: fix "permission denied" test after g_dir_open
[babeltrace.git] / src / cli / babeltrace2-cfg-src-auto-disc.c
index 6dcb9e2c9b39194de84d2adb8235b89c0c4cc9b4..6b1b45635dca0fc813077cac11ca36c3258f83df 100644 (file)
@@ -525,7 +525,7 @@ int auto_discover_source_for_input_as_dir_or_file_rec(GString *input,
                        const char *fmt = "Failed to open directory %s: %s";
                        BT_LOGW(fmt, input->str, error->message);
 
-                       if (errno == EACCES) {
+                       if (error->code == G_FILE_ERROR_ACCES) {
                                /* This is not a fatal error, we just skip it. */
                                status = 1;
                                goto end;
This page took 0.023814 seconds and 4 git commands to generate.