lib/repo-finder-mount: Fix propagating NULL errors

These two code paths tried to propagate errors which had never been set.
Set new errors instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1303
Approved by: cgwalters
This commit is contained in:
Philip Withnall 2017-10-24 15:26:49 +01:00 committed by Atomic Bot
parent b11d1aa3f2
commit 886a5d7928

View File

@ -235,8 +235,7 @@ scan_repo (int dfd,
{
g_debug ("Ignoring repository %s on mount %s as its on a different file system from the mount",
path, mount_name);
g_propagate_error (error, g_steal_pointer (&local_error));
return FALSE;
return glnx_throw (error, "Repository is on a different file system from the mount");
}
/* Exclude repositories which resolve to @parent_repo. */
@ -245,8 +244,7 @@ scan_repo (int dfd,
{
g_debug ("Ignoring repository %s on mount %s as it is the same as the one we are resolving",
path, mount_name);
g_propagate_error (error, g_steal_pointer (&local_error));
return FALSE;
return glnx_throw (error, "Repository is the same as the one we are resolving");
}
/* List the repos refs and return them. */