From ebb334ea818bbf3977c4c68e268ea23cdd13103a Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Thu, 12 Sep 2019 13:34:12 +0200 Subject: [PATCH] handle special case of '/' as mount point --- src/plugins/file_system/s4u_FileSystem.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/file_system/s4u_FileSystem.cpp b/src/plugins/file_system/s4u_FileSystem.cpp index e9aeb843f4..2b88d165c2 100644 --- a/src/plugins/file_system/s4u_FileSystem.cpp +++ b/src/plugins/file_system/s4u_FileSystem.cpp @@ -68,7 +68,11 @@ File::File(const std::string& fullpath, sg_host_t host, void* userdata) : fullpa } if (longest_prefix_length > 0) { /* Mount point found, split fullpath_ into mount_name and path+filename*/ mount_point_ = fullpath_.substr(0, longest_prefix_length); - path_ = fullpath_.substr(longest_prefix_length, fullpath_.length()); + if (mount_point_ == std::string("/")) + path_ = fullpath_; + else + path_ = fullpath_.substr(longest_prefix_length, fullpath_.length()); + XBT_DEBUG("%s + %s", mount_point_.c_str(), path_.c_str()); } else xbt_die("Can't find mount point for '%s' on '%s'", fullpath_.c_str(), host->get_cname()); } -- 2.20.1