Fix xml parse error

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33327 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-06-17 13:47:24 +00:00
parent 074a57a018
commit 54a0546f98
4 changed files with 45 additions and 0 deletions

View file

@ -657,6 +657,34 @@ static NSUInteger urlAlign;
return self;
}
- (id) initFileURLWithPath: (NSString*)aPath isDirectory: (BOOL)isDir
{
NSFileManager *mgr = [NSFileManager defaultManager];
BOOL flag = NO;
if ([aPath isAbsolutePath] == NO)
{
aPath = [[mgr currentDirectoryPath]
stringByAppendingPathComponent: aPath];
}
if ([mgr fileExistsAtPath: aPath isDirectory: &flag] == YES)
{
if ([aPath isAbsolutePath] == NO)
{
aPath = [aPath stringByStandardizingPath];
}
isDir = flag;
}
if (isDir == YES && [aPath hasSuffix: @"/"] == NO)
{
aPath = [aPath stringByAppendingString: @"/"];
}
self = [self initWithScheme: NSURLFileScheme
host: @"localhost"
path: aPath];
return self;
}
- (id) initWithScheme: (NSString*)aScheme
host: (NSString*)aHost
path: (NSString*)aPath

View file

@ -1903,6 +1903,10 @@ NSLog(@"_processTag <%@%@ %@>", flag?@"/": @"", tag, attributes);
[attributes setObject: val forKey: arg];
[val release];
c = cget(); // get character behind qarg value
while (isspace(c))
{
c = cget();
}
}
else // implicit
{