mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-27 18:10:03 +01:00
Don't try and generate a dotfile from the name -- it doesn't work with
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com> * glib/gfileutils.c (write_to_temp_file): Don't try and generate a dotfile from the name -- it doesn't work with absolute paths. Also make documentation indicate that symlinks will be overwritten. Both pointed out by Alexis S. L. Carvalho.
This commit is contained in:
parent
aae7e432c6
commit
858107437b
@ -1,3 +1,10 @@
|
||||
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* glib/gfileutils.c (write_to_temp_file): Don't try and generate
|
||||
a dotfile from the name -- it doesn't work with absolute
|
||||
paths. Also make documentation indicate that symlinks will be
|
||||
overwritten. Both pointed out by Alexis S. L. Carvalho.
|
||||
|
||||
2005-03-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Avoid stupid compiler complaints
|
||||
|
@ -1,3 +1,10 @@
|
||||
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* glib/gfileutils.c (write_to_temp_file): Don't try and generate
|
||||
a dotfile from the name -- it doesn't work with absolute
|
||||
paths. Also make documentation indicate that symlinks will be
|
||||
overwritten. Both pointed out by Alexis S. L. Carvalho.
|
||||
|
||||
2005-03-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Avoid stupid compiler complaints
|
||||
|
@ -1,3 +1,10 @@
|
||||
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* glib/gfileutils.c (write_to_temp_file): Don't try and generate
|
||||
a dotfile from the name -- it doesn't work with absolute
|
||||
paths. Also make documentation indicate that symlinks will be
|
||||
overwritten. Both pointed out by Alexis S. L. Carvalho.
|
||||
|
||||
2005-03-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Avoid stupid compiler complaints
|
||||
|
@ -1,3 +1,10 @@
|
||||
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* glib/gfileutils.c (write_to_temp_file): Don't try and generate
|
||||
a dotfile from the name -- it doesn't work with absolute
|
||||
paths. Also make documentation indicate that symlinks will be
|
||||
overwritten. Both pointed out by Alexis S. L. Carvalho.
|
||||
|
||||
2005-03-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Avoid stupid compiler complaints
|
||||
|
@ -841,7 +841,7 @@ rename_file (const char *old_name,
|
||||
|
||||
static gchar *
|
||||
write_to_temp_file (const gchar *contents,
|
||||
gsize length,
|
||||
gssize length,
|
||||
const gchar *template,
|
||||
GError **err)
|
||||
{
|
||||
@ -854,7 +854,7 @@ write_to_temp_file (const gchar *contents,
|
||||
|
||||
retval = NULL;
|
||||
|
||||
tmp_name = g_strdup_printf (".%s.XXXXXX", template);
|
||||
tmp_name = g_strdup_printf ("%s.XXXXXX", template);
|
||||
|
||||
errno = 0;
|
||||
fd = g_mkstemp (tmp_name);
|
||||
@ -954,7 +954,8 @@ write_to_temp_file (const gchar *contents,
|
||||
* <listitem>
|
||||
* On Unix, if @filename already exists hard links to @filename will break.
|
||||
* Also since the file is recreated, existing permissions, access control
|
||||
* lists, metadata etc. may be lost.
|
||||
* lists, metadata etc. may be lost. If @filename is a symbolic link,
|
||||
* the link itself will be replaced, not the linked file.
|
||||
* </listitem>
|
||||
* <listitem>
|
||||
* On Windows renaming a file will not remove an existing file with the
|
||||
@ -989,7 +990,8 @@ g_file_replace (const gchar *filename,
|
||||
g_return_val_if_fail (filename != NULL, FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
g_return_val_if_fail (contents != NULL || length == 0, FALSE);
|
||||
|
||||
g_return_val_if_fail (length >= -1, FALSE);
|
||||
|
||||
if (length == -1)
|
||||
length = strlen (contents);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user