From: suter Date: Tue, 27 May 2014 11:15:07 +0000 (+0200) Subject: seek back to the beginning of the file to be sure that the whole file is X-Git-Tag: v3_11~30 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5b7aa79a882ececf3257f42b28e9d3099fbdbbcd?hp=6deda44a1a33136e4380dcc57643c34192bb96b2 seek back to the beginning of the file to be sure that the whole file is copied/moved --- diff --git a/src/msg/msg_io.c b/src/msg/msg_io.c index 65e40d693e..4b65d0359a 100644 --- a/src/msg/msg_io.c +++ b/src/msg/msg_io.c @@ -321,6 +321,7 @@ msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa msg_storage_t storage_src =(msg_storage_t) xbt_lib_get_elm_or_null(storage_lib, file_priv->storageId); msg_storage_priv_t storage_priv_src = MSG_storage_priv(storage_src); msg_host_t attached_host = MSG_get_host_by_name(storage_priv_src->hostname); + MSG_file_seek(file, 0, SEEK_SET); read_size = simcall_file_read(file_priv->simdata->smx_file, file_priv->size, attached_host); /* Find the real host destination where the file will be physically stored */