diff options
author | Phaedrus Leeds <mwleeds@protonmail.com> | 2022-02-23 10:48:28 -0800 |
---|---|---|
committer | Phaedrus Leeds <mwleeds@protonmail.com> | 2022-03-21 13:07:44 -0700 |
commit | 40992f9616d196162383c13f0ebb11eec5ed535b (patch) | |
tree | 870dc455421b857ac7174aa8e95bc4bd27866d39 /src | |
parent | f7a14e87561e3d572280398b0120179659f7dc3b (diff) | |
download | epiphany-40992f9616d196162383c13f0ebb11eec5ed535b.tar.gz |
profile-migrator: Fix GFileEnumerator error handling
Don't dereference a NULL GError in case the directory being iterated
over is empty. This probably hasn't come up in practice since
~/.local/share is hardly ever empty.
Diffstat (limited to 'src')
-rw-r--r-- | src/profile-migrator/ephy-profile-migrator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c index 33939e507..8267d3fd0 100644 --- a/src/profile-migrator/ephy-profile-migrator.c +++ b/src/profile-migrator/ephy-profile-migrator.c @@ -1305,7 +1305,7 @@ migrate_webapp_names (void) return; info = g_file_enumerator_next_file (children, NULL, &error); - if (!info) { + if (error) { g_warning ("Cannot enumerate profile directory: %s", error->message); return; } @@ -1520,7 +1520,7 @@ migrate_pre_flatpak_webapps (void) } info = g_file_enumerator_next_file (children, NULL, &error); - if (!info) { + if (error) { g_warning ("Cannot enumerate profile directory: %s", error->message); return; } |