Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #200 from Takishipp/clear_fct
[simgrid.git] / src / msg / msg_io.cpp
index b479145..1913d3b 100644 (file)
@@ -200,10 +200,7 @@ int MSG_file_close(msg_file_t fd)
  */
 msg_error_t MSG_file_unlink(msg_file_t fd)
 {
-  /* Find the host where the file is physically located (remote or local)*/
-  msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
-  msg_host_t attached_host  = storage_src->getHost();
-  fd->unlink(attached_host);
+  fd->unlink();
   delete fd;
   return MSG_OK;
 }
@@ -326,7 +323,7 @@ msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa
 
   /* Create file on remote host, write it and close it */
   msg_file_t fd = new simgrid::s4u::File(fullpath, dst_host, nullptr);
-  fd->write(read_size, dst_host);
+  fd->write(read_size);
   delete fd;
   return MSG_OK;
 }