Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use string::compare with C++ strings.
[simgrid.git] / src / plugins / file_system / s4u_FileSystem.cpp
index 74227e3..b28d3d8 100644 (file)
@@ -193,7 +193,7 @@ sg_size_t File::tell()
 void File::move(const std::string& fullpath)
 {
   /* Check if the new full path is on the same mount point */
-  if (not strncmp(mount_point_.c_str(), fullpath.c_str(), mount_point_.length())) {
+  if (fullpath.compare(0, mount_point_.length(), mount_point_) == 0) {
     std::map<std::string, sg_size_t>* content = local_storage_->extension<FileSystemStorageExt>()->get_content();
     auto sz = content->find(path_);
     if (sz != content->end()) { // src file exists