Improve the g_file_make_symbolic_link docs
[platform/upstream/glib.git] / gio / gfile.c
index 9bad3f7..d104ab4 100644 (file)
@@ -2752,7 +2752,7 @@ retry:
         goto retry;
       else if (errsv == ENOSYS || errsv == EINVAL)
         g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-                             "Splice not supported");
+                             _("Splice not supported"));
       else
         g_set_error (error, G_IO_ERROR,
                      g_io_error_from_errno (errsv),
@@ -2826,10 +2826,10 @@ splice_stream_with_progress (GInputStream           *in,
       while (n_read > 0)
         {
           if (g_cancellable_set_error_if_cancelled (cancellable, error))
-            break;
+            goto out;
 
           if (!do_splice (buffer[0], NULL, fd_out, &offset_out, n_read, &n_written, error))
-            break;
+            goto out;
 
           n_read -= n_written;
         }
@@ -2842,6 +2842,7 @@ splice_stream_with_progress (GInputStream           *in,
   if (progress_callback)
     progress_callback (offset_in, total_size, progress_callback_data);
 
+ out:
   close (buffer[0]);
   close (buffer[1]);
 
@@ -3444,19 +3445,20 @@ g_file_make_directory_with_parents (GFile         *file,
 
 /**
  * g_file_make_symbolic_link:
- * @file: input #GFile.
- * @symlink_value: a string with the value of the new symlink.
+ * @file: a #GFile with the name of the symlink to create
+ * @symlink_value: a string with the path for the target of the new symlink
  * @cancellable: optional #GCancellable object, %NULL to ignore.
- * @error: a #GError. 
- * 
- * Creates a symbolic link.
+ * @error: a #GError.
+ *
+ * Creates a symbolic link named @file which contains the string
+ * @symlink_value.
  *
  * If @cancellable is not %NULL, then the operation can be cancelled by
  * triggering the cancellable object from another thread. If the operation
- * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. 
- * 
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
  * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
- **/
+ */
 gboolean
 g_file_make_symbolic_link (GFile         *file,
                           const char    *symlink_value,