[gegl] gegl/buffer: use g_open,g_access instead of open,access
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl/buffer: use g_open,g_access instead of open,access
- Date: Fri, 18 May 2012 15:33:59 +0000 (UTC)
commit 48c1d6ac8925c8b015748c2a445268ddad842d3b
Author: Massimo Valentini <mvalentini src gnome org>
Date: Fri May 18 15:02:19 2012 +0200
gegl/buffer: use g_open,g_access instead of open,access
Bug 675591: Errors due to non-Latin letters in the name
of the user profile.
gegl/buffer/gegl-buffer-load.c | 2 +-
gegl/buffer/gegl-buffer-save.c | 4 ++--
gegl/buffer/gegl-tile-backend-file.c | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-load.c b/gegl/buffer/gegl-buffer-load.c
index f1c772d..2c81ee8 100644
--- a/gegl/buffer/gegl-buffer-load.c
+++ b/gegl/buffer/gegl-buffer-load.c
@@ -257,7 +257,7 @@ gegl_buffer_load (const gchar *path)
LoadInfo *info = g_slice_new0 (LoadInfo);
info->path = g_strdup (path);
- info->i = open (info->path, O_RDONLY);
+ info->i = g_open (info->path, O_RDONLY);
GEGL_NOTE (GEGL_DEBUG_BUFFER_LOAD, "starting to load buffer %s", path);
if (info->i == -1)
{
diff --git a/gegl/buffer/gegl-buffer-save.c b/gegl/buffer/gegl-buffer-save.c
index e94a5b5..3d68103 100644
--- a/gegl/buffer/gegl-buffer-save.c
+++ b/gegl/buffer/gegl-buffer-save.c
@@ -226,9 +226,9 @@ gegl_buffer_save (GeglBuffer *buffer,
info->path = g_strdup (path);
#ifndef G_OS_WIN32
- info->o = open (info->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ info->o = g_open (info->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
#else
- info->o = open (info->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR);
+ info->o = g_open (info->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR);
#endif
diff --git a/gegl/buffer/gegl-tile-backend-file.c b/gegl/buffer/gegl-tile-backend-file.c
index 63d6105..e51d043 100644
--- a/gegl/buffer/gegl-tile-backend-file.c
+++ b/gegl/buffer/gegl-tile-backend-file.c
@@ -856,7 +856,7 @@ gegl_tile_backend_file_constructor (GType type,
/* If the file already exists open it, assuming it is a GeglBuffer. */
- if (access (self->path, F_OK) != -1)
+ if (g_access (self->path, F_OK) != -1)
{
goffset offset = 0;
@@ -869,7 +869,7 @@ gegl_tile_backend_file_constructor (GType type,
G_CALLBACK (gegl_tile_backend_file_file_changed),
self);
- self->o = open (self->path, O_RDWR|O_CREAT, 0770);
+ self->o = g_open (self->path, O_RDWR|O_CREAT, 0770);
if (self->o == -1)
{
/* Try again but this time with only read access. This is
@@ -877,7 +877,7 @@ gegl_tile_backend_file_constructor (GType type,
* when it opens a GeglBuffer file in the source tree
* (which is read-only).
*/
- self->o = open (self->path, O_RDONLY, 0770);
+ self->o = g_open (self->path, O_RDONLY, 0770);
if (self->o == -1)
g_warning ("%s: Could not open '%s': %s", G_STRFUNC, self->path, g_strerror (errno));
@@ -933,7 +933,7 @@ gegl_tile_backend_file_ensure_exist (GeglTileBackendFile *self)
GEGL_NOTE (GEGL_DEBUG_TILE_BACKEND, "creating swapfile %s", self->path);
- self->o = open (self->path, O_RDWR|O_CREAT, 0770);
+ self->o = g_open (self->path, O_RDWR|O_CREAT, 0770);
if (self->o == -1)
g_warning ("%s: Could not open '%s': %s", G_STRFUNC, self->path, g_strerror (errno));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]