Skip to content

Spaces in file path doesn't work #1704

Closed
@atotalnoob

Description

@atotalnoob

Issue Title

Spaces in file path doesn't work

General

Dotnet version: 2.1.201
OS: Windows 10 build 17134.112
Using Visual Studio 2017 Enterprise version 15.7.1

Please provide a code sample for your issue if it is relevant, either inline, link to a gist (or similar) or add it as a zipped attachment.

Using System.IO.File.ReadAllText(), when loading a file path that has a space in it throws System.IO.DirectoryNotFoundException : 'Could not find a part of the path 'C:\Users\firstName lastName\source\repos\IntentAnalysis\MLTests\bin\Debug\netcoreapp2.0\Data\Dataset\intents.json'.'

Tried these args, as well as their relative counter parts:
@"C:\Users\firstName lastName\source\repos\IntentAnalysis\MLTests\bin\Debug\netcoreapp2.0\Data\Dataset\intents.json"
""C:\Users\firstName lastName\source\repos\IntentAnalysis\MLTests\bin\Debug\netcoreapp2.0\Data\Dataset\intents.json"

If I paste the path into File Explorer, it says it can't be found, but copying and pasting the two paths right next to each other, they are both the exact same.

Issue is similar to dotnet/machinelearning#191

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions