-/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
host->get_cname());
/* Mount point found, split fullpath_ into mount_name and path+filename*/
mount_point_ = fullpath_.substr(0, longest_prefix_length);
- if (mount_point_ == std::string("/"))
+ if (mount_point_ == "/")
path_ = fullpath_;
else
path_ = fullpath_.substr(longest_prefix_length, fullpath_.length());
for (auto const& disk : host->get_disks()) {
std::string current_mount = disk->extension<FileSystemDiskExt>()->get_mount_point();
- std::string mount_point = std::string(fullpath).substr(0, current_mount.length());
+ std::string mount_point = fullpath.substr(0, current_mount.length());
if (mount_point == current_mount && current_mount.length() > longest_prefix_length) {
/* The current mount name is found in the full path and is bigger than the previous*/
longest_prefix_length = current_mount.length();
}
if (const char* current_mount_str = ptr->get_property("mount"))
- mount_point_ = std::string(current_mount_str);
+ mount_point_ = current_mount_str;
else
- mount_point_ = std::string("/");
+ mount_point_ = "/";
if (const char* content_str = ptr->get_property("content"))
content_.reset(parse_content(content_str));