A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
handle special case of '/' as mount point
[simgrid.git]
/
src
/
plugins
/
file_system
/
s4u_FileSystem.cpp
diff --git
a/src/plugins/file_system/s4u_FileSystem.cpp
b/src/plugins/file_system/s4u_FileSystem.cpp
index
e9aeb84
..
2b88d16
100644
(file)
--- 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);
}
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());
}
} else
xbt_die("Can't find mount point for '%s' on '%s'", fullpath_.c_str(), host->get_cname());
}