Skip to content
This repository was archived by the owner on Nov 6, 2018. It is now read-only.
This repository was archived by the owner on Nov 6, 2018. It is now read-only.

EmbededFileProvider doesn't work with paths/filenames with special characters #184

@shutdown256

Description

@shutdown256

If you have embeded resource in folder containing dash "-" in its name it gets translated into underscore inside an assembly. EmbededFileProvider is not respecting that.

I've put together quick (and probably dirty) fix:

var sc = tsp.Count(c => c == '/' || c == '\\');
var sp = 0;
for (var i = _baseNamespace.Length; i < builder.Length; i++) {
    if (builder[i] == '/' || builder[i] == '\\') {
        sp++;
         builder[i] = '.';
    } else if (builder[i] == '-' && sp < sc) {
         builder[i] = '_';
    }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions