Skip to content

getDirectorySeparator() returns "\\" on Windows but it sometimes should return "/" #246

@emilybache

Description

@emilybache

In SystemUtils.cpp there is a function "getDirectorySeparator()". On Windows (when #ifdef _WIN32 returns true) it returns "\".

When you are running under WSL it needs to return "/".
When you are running on a Windows machine under AWS "WorkSpaces Applications" it also needs to return "/".

If you have the wrong directory separator then your tests fail with this message:

Failure:
test case THREW exception:
Unable to create directory:

What it has failed to do is work out the path to put the received file in, since it can't properly parse the directory the test case is in.

I have patched this problem locally where I have seen it just by replacing "\" with "/" in the code. I don't know how to properly determine which directory separator to use on Windows, but it seems that #ifdef _WIN32 is not a good enough guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions