sim,sim-se: Fixes the bug of missing "/" in path resolution
The syscall emulation did not correctly handle the scenario where the base path does not end with "/". The "/" should be appended first before the file name is appended. This commit fixes this bug. Change-Id: I9a9b38d1885e46b2a0e42018fd7d68010c70133c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64471 Maintainer: Bobby Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
@@ -520,7 +520,7 @@ Process::absolutePath(const std::string &filename, bool host_filesystem)
|
||||
}
|
||||
|
||||
// Add a trailing '/' if the current working directory did not have one.
|
||||
normalize(path_base);
|
||||
path_base = normalize(path_base);
|
||||
|
||||
// Append the filename onto the current working path.
|
||||
auto absolute_path = path_base + filename;
|
||||
|
||||
Reference in New Issue
Block a user