Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix issue with file unlinking
[simgrid.git] / src / plugins / file_system / s4u_FileSystem.cpp
index 669bf1d70616467d9ef95c72c3a82025b22ace42..6b6313011c7e13ebd1d409aac9829b4f4ca48f58 100644 (file)
@@ -17,7 +17,7 @@
 #include <fstream>
 #include <numeric>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_file, "S4U files");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_file, s4u, "S4U files");
 int sg_storage_max_file_descriptors = 1024;
 
 namespace simgrid {
@@ -26,7 +26,7 @@ simgrid::xbt::Extension<Disk, FileSystemDiskExt> FileSystemDiskExt::EXTENSION_ID
 simgrid::xbt::Extension<Storage, FileSystemStorageExt> FileSystemStorageExt::EXTENSION_ID;
 simgrid::xbt::Extension<Host, FileDescriptorHostExt> FileDescriptorHostExt::EXTENSION_ID;
 
-File::File(const std::string& fullpath, void* userdata) : File(fullpath, Host::current(), userdata){};
+File::File(const std::string& fullpath, void* userdata) : File(fullpath, Host::current(), userdata){}
 
 File::File(const std::string& fullpath, sg_host_t host, void* userdata) : fullpath_(fullpath)
 {
@@ -336,7 +336,7 @@ int File::unlink()
       local_disk_->extension<FileSystemDiskExt>()->decr_used_size(size_);
 
     // Remove the file from storage
-    content->erase(fullpath_);
+    content->erase(path_);
 
     return 0;
   }