summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-29 10:33:36 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-29 10:33:36 +0900
commitb2256334d90983b75ea619a48bde4bdd53677502 (patch)
tree42b2f9499931a69d9487b54d9369306508ee07f1 /gio
parentf5b260ac6e4e8c4f94e33d6a1656d786be036333 (diff)
downloadglib-b2256334d90983b75ea619a48bde4bdd53677502.tar.gz
glib-b2256334d90983b75ea619a48bde4bdd53677502.tar.bz2
glib-b2256334d90983b75ea619a48bde4bdd53677502.zip
Imported Upstream version 2.68.0upstream/2.68.0
Diffstat (limited to 'gio')
-rw-r--r--gio/gbytesicon.c5
-rw-r--r--gio/glocalfileoutputstream.c33
-rw-r--r--gio/meson.build2
3 files changed, 22 insertions, 18 deletions
diff --git a/gio/gbytesicon.c b/gio/gbytesicon.c
index b2323d905..4103b60bc 100644
--- a/gio/gbytesicon.c
+++ b/gio/gbytesicon.c
@@ -146,8 +146,11 @@ g_bytes_icon_init (GBytesIcon *bytes)
*
* Creates a new icon for a bytes.
*
+ * This cannot fail, but loading and interpreting the bytes may fail later on
+ * (for example, if g_loadable_icon_load() is called) if the image is invalid.
+ *
* Returns: (transfer full) (type GBytesIcon): a #GIcon for the given
- * @bytes, or %NULL on error.
+ * @bytes.
*
* Since: 2.38
**/
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
index 4c512ea81..78d3e85a6 100644
--- a/gio/glocalfileoutputstream.c
+++ b/gio/glocalfileoutputstream.c
@@ -943,7 +943,7 @@ handle_overwrite_open (const char *filename,
_("Error when getting information for file ā€œ%sā€: %s"),
display_name, g_strerror (errsv));
g_free (display_name);
- goto err_out;
+ goto error;
}
/* not a regular file */
@@ -955,7 +955,7 @@ handle_overwrite_open (const char *filename,
G_IO_ERROR,
G_IO_ERROR_IS_DIRECTORY,
_("Target file is a directory"));
- goto err_out;
+ goto error;
}
else if (!is_symlink ||
#ifdef S_ISLNK
@@ -969,7 +969,7 @@ handle_overwrite_open (const char *filename,
G_IO_ERROR,
G_IO_ERROR_NOT_REGULAR_FILE,
_("Target file is not a regular file"));
- goto err_out;
+ goto error;
}
}
@@ -983,7 +983,7 @@ handle_overwrite_open (const char *filename,
G_IO_ERROR_WRONG_ETAG,
_("The file was externally modified"));
g_free (current_etag);
- goto err_out;
+ goto error;
}
g_free (current_etag);
}
@@ -1078,7 +1078,7 @@ handle_overwrite_open (const char *filename,
G_IO_ERROR_CANT_CREATE_BACKUP,
_("Backup file creation failed"));
g_free (backup_filename);
- goto err_out;
+ goto error;
}
bfd = g_open (backup_filename,
@@ -1092,7 +1092,7 @@ handle_overwrite_open (const char *filename,
G_IO_ERROR_CANT_CREATE_BACKUP,
_("Backup file creation failed"));
g_free (backup_filename);
- goto err_out;
+ goto error;
}
/* If needed, Try to set the group of the backup same as the
@@ -1109,7 +1109,7 @@ handle_overwrite_open (const char *filename,
g_unlink (backup_filename);
g_close (bfd, NULL);
g_free (backup_filename);
- goto err_out;
+ goto error;
}
if ((_g_stat_gid (&original_stat) != _g_stat_gid (&tmp_statbuf)) &&
@@ -1126,7 +1126,7 @@ handle_overwrite_open (const char *filename,
g_unlink (backup_filename);
g_close (bfd, NULL);
g_free (backup_filename);
- goto err_out;
+ goto error;
}
}
#endif
@@ -1141,7 +1141,7 @@ handle_overwrite_open (const char *filename,
g_close (bfd, NULL);
g_free (backup_filename);
- goto err_out;
+ goto error;
}
g_close (bfd, NULL);
@@ -1156,7 +1156,7 @@ handle_overwrite_open (const char *filename,
g_io_error_from_errno (errsv),
_("Error seeking in file: %s"),
g_strerror (errsv));
- goto err_out;
+ goto error;
}
}
@@ -1172,7 +1172,7 @@ handle_overwrite_open (const char *filename,
g_io_error_from_errno (errsv),
_("Error removing old file: %s"),
g_strerror (errsv));
- goto err_out2;
+ goto error;
}
if (readable)
@@ -1189,7 +1189,7 @@ handle_overwrite_open (const char *filename,
_("Error opening file ā€œ%sā€: %s"),
display_name, g_strerror (errsv));
g_free (display_name);
- goto err_out2;
+ goto error;
}
}
else
@@ -1207,15 +1207,16 @@ handle_overwrite_open (const char *filename,
g_io_error_from_errno (errsv),
_("Error truncating file: %s"),
g_strerror (errsv));
- goto err_out;
+ goto error;
}
}
return fd;
- err_out:
- g_close (fd, NULL);
- err_out2:
+error:
+ if (fd >= 0)
+ g_close (fd, NULL);
+
return -1;
}
diff --git a/gio/meson.build b/gio/meson.build
index 397882f75..49a37a7bd 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -965,7 +965,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
glib_compile_schemas = executable('glib-compile-schemas',
- [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-schemas.c'],
+ ['gvdb/gvdb-builder.c', 'glib-compile-schemas.c'],
install : true,
# intl.lib is not compatible with SAFESEH
link_args : noseh_link_args,