Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions compose/asc-directory-unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,16 @@ static gboolean
asc_directory_unit_find_files_recursive (GPtrArray *files,
const gchar *path_orig,
guint path_orig_len,
const gchar *path,
GError **error)
{
g_autoptr(GHashTable) visited_dirs = NULL;
g_autofree gchar *absolute_lookup_path = NULL;
visited_dirs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);

absolute_lookup_path = g_build_filename (path_orig, path, NULL);
g_debug ("Indexing location: %s\n", absolute_lookup_path);
g_debug ("Indexing location: %s\n", path_orig);
return asc_directory_unit_find_files_recursive_internal (files,
path_orig,
path_orig_len,
path,
path_orig,
visited_dirs,
error);
}
Expand All @@ -188,7 +185,6 @@ asc_directory_unit_open (AscUnit *unit, GError **error)
if (!asc_directory_unit_find_files_recursive (contents,
priv->root_dir,
root_dir_len,
priv->root_dir,
error))
return FALSE;
} else {
Expand All @@ -199,9 +195,8 @@ asc_directory_unit_open (AscUnit *unit, GError **error)
check_path = g_build_filename (priv->root_dir, rel_path, NULL);

if (!asc_directory_unit_find_files_recursive (contents,
priv->root_dir,
root_dir_len,
check_path,
root_dir_len,
error))
Comment on lines 197 to 200
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter order is incorrect. According to the function signature, path_orig should come before path_orig_len, but check_path and root_dir_len are passed in the wrong order.

Copilot uses AI. Check for mistakes.
return FALSE;
}
Expand Down