summary refs log tree commit diff stats
path: root/src/common/util.c
diff options
context:
space:
mode:
authorArnav Singh <arnavion@gmail.com>2012-11-11 19:34:09 -0800
committerArnav Singh <arnavion@gmail.com>2012-11-11 19:34:09 -0800
commited269176919c766ead728e08663715b7f9b1c349 (patch)
treea896a6016ba8dc92c2b365d6332ce7502650610c /src/common/util.c
parent49d5234b39aa491747864efba1c2246c6e960b6f (diff)
utf8-everywhere: Fixed some remaining C file I/O API calls to use the glib API.
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/util.c b/src/common/util.c
index d4bfeac9..2587a7fa 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1607,25 +1607,25 @@ file_exists (char *fname)
 }
 
 static gboolean
-copy_file (char *dl_src, char *dl_dest, int permissions)	/* FS encoding */
+copy_file (char *dl_src, char *dl_dest, int permissions)
 {
 	int tmp_src, tmp_dest;
 	gboolean ok = FALSE;
 	char dl_tmp[4096];
 	int return_tmp, return_tmp2;
 
-	if ((tmp_src = open (dl_src, O_RDONLY | OFLAGS)) == -1)
+	if ((tmp_src = g_open (dl_src, O_RDONLY | OFLAGS)) == -1)
 	{
-		fprintf (stderr, "Unable to open() file '%s' (%s) !", dl_src,
+		g_fprintf (stderr, "Unable to open() file '%s' (%s) !", dl_src,
 				  strerror (errno));
 		return FALSE;
 	}
 
 	if ((tmp_dest =
-		 open (dl_dest, O_WRONLY | O_CREAT | O_TRUNC | OFLAGS, permissions)) < 0)
+		 g_fprintf (dl_dest, O_WRONLY | O_CREAT | O_TRUNC | OFLAGS, permissions)) < 0)
 	{
 		close (tmp_src);
-		fprintf (stderr, "Unable to create file '%s' (%s) !", dl_src,
+		g_fprintf (stderr, "Unable to create file '%s' (%s) !", dl_src,
 				  strerror (errno));
 		return FALSE;
 	}