Skip to content

Commit

Permalink
i#3278 windows file path: temporarily strip dot/slash in path (#3279)
Browse files Browse the repository at this point in the history
Temporarily strip path such that Windows loader can handle it (xref DrMi#2138).

Issue: #3278
  • Loading branch information
Hendrik Greving authored and derekbruening committed Nov 20, 2018
1 parent 2f90545 commit 3e25674
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/win32/os.c
Original file line number Diff line number Diff line change
Expand Up @@ -6478,6 +6478,9 @@ convert_to_NT_file_path(OUT wchar_t *buf, IN const char *fname,
* to do that? is it to translate . or ..?, better just to do the
* translation here where we know what's going on */
/* XXX: if you change the logic here, change convert_to_NT_file_path_wide() */
/* XXX i#3278: support /./ style file paths. Remove workaround in cmake function
* DynamoRIO_get_full_path.
*/
if (name[0] == '\\') {
name += 1; /* eat the first \ */
if (name[0] == '\\') {
Expand Down
3 changes: 3 additions & 0 deletions make/utils_exposed.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ function (DynamoRIO_get_full_path out target loc_suffix)
set(output_dir ${runtime_dir})
endif ()
endif ()
# XXX i#3278: DR's win loader can't handle a path like that until full support has
# been implemented in convert_to_NT_file_path.
string(REPLACE "/./" "/" output_dir ${output_dir})
if (output_name)
set(${out} "${output_dir}/${prefix}${output_name}${suffix}" PARENT_SCOPE)
else ()
Expand Down

0 comments on commit 3e25674

Please sign in to comment.