[gnome-autoar/wip/oholy/various-fixes: 19/23] Revert "extractor: Do not fail if parent folders don't exist"
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-autoar/wip/oholy/various-fixes: 19/23] Revert "extractor: Do not fail if parent folders don't exist"
- Date: Fri, 12 Mar 2021 15:42:21 +0000 (UTC)
commit d0810759d0e13c27617fa2c8bb4444d6cda1b7b0
Author: Ondrej Holy <oholy redhat com>
Date: Mon Mar 1 17:17:39 2021 +0100
Revert "extractor: Do not fail if parent folders don't exist"
This reverts commit cc4e8b7ccc973ac69d75a7423fbe1bcdc51e2cb3.
gnome-autoar/autoar-extractor.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gnome-autoar/autoar-extractor.c b/gnome-autoar/autoar-extractor.c
index 9ff7c09..eaccafe 100644
--- a/gnome-autoar/autoar-extractor.c
+++ b/gnome-autoar/autoar-extractor.c
@@ -877,7 +877,6 @@ is_valid_filename (GFile *file, GFile *destination)
{
g_autoptr (GFile) parent = NULL;
g_autoptr (GFileInfo) info = NULL;
- g_autoptr (GError) error = NULL;
if (g_file_equal (file, destination))
return TRUE;
@@ -892,13 +891,11 @@ is_valid_filename (GFile *file, GFile *destination)
G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET,
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
NULL,
- &error);
-
- /* The parent directories don't have to be created yet. */
- if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
+ NULL);
+ if (info == NULL)
return FALSE;
- if (info && g_file_info_get_is_symlink (info)) {
+ if (g_file_info_get_is_symlink (info)) {
g_autoptr (GFile) cwd = NULL;
const gchar *target;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]