dotnet / dotnet/dotnet-api-docs

Function does not handle paths with whitespace

Open
#1,021 0 comments 0 reactions 0 assignees View on GitHub
area-System.IO dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

This function cannot handle paths with whitespace. It will truncate at the first location with whitespace. The doc says nothing about this.

Attempting to quote such a path throws an ArgumentException because the quotes are illegal characters.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: f5f481a9-6cdc-49c0-098b-08e639f1e161
* Version Independent ID: 43b2e376-a7d2-29fa-4012-3934bf931fc4
* Content: [Path.GetDirectoryName Method (System.IO)](https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getdirectoryname?view=netcore-2.1#System_IO_Path_GetDirectoryName_System_String_)
* Content Source: [xml/System.IO/Path.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.IO/Path.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.