mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
initWithScheme:host:path: update parser to detect Windows ALPHA symbol
This commit is contained in:
parent
8e0dc2ace6
commit
baf1bb9f73
1 changed files with 13 additions and 0 deletions
|
@ -752,6 +752,19 @@ static NSUInteger urlAlign;
|
||||||
aUrlString = [aUrlString initWithFormat: @"%@://%@%@",
|
aUrlString = [aUrlString initWithFormat: @"%@://%@%@",
|
||||||
aScheme, aHost, aPath];
|
aScheme, aHost, aPath];
|
||||||
}
|
}
|
||||||
|
#if defined(_WIN32)
|
||||||
|
/* On Windows file systems, an absolute file path can begin with
|
||||||
|
* a drive letter. The first component in an absolute path
|
||||||
|
* (e.g. C:) has to be enclosed by a leading slash.
|
||||||
|
*
|
||||||
|
* "file:///c:/path/to/file"
|
||||||
|
*/
|
||||||
|
else if ([aScheme isEqualToString: @"file"] && [aPath characterAtIndex:1] == ':')
|
||||||
|
{
|
||||||
|
aUrlString = [aUrlString initWithFormat: @"%@:///%@%@",
|
||||||
|
aScheme, aHost, aPath];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aUrlString = [aUrlString initWithFormat: @"%@://%@/%@",
|
aUrlString = [aUrlString initWithFormat: @"%@://%@/%@",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue