Keep old behavior of setResourceData:

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11711 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-12-12 14:17:03 +00:00
parent d66a641c93
commit b31e30a93c
2 changed files with 16 additions and 1 deletions

View file

@ -5,6 +5,7 @@
so its behavior is consistent with ([writeProperty:forKey:]) and
can be used in conjunction with background loading (ie all I/O
is done during the load).
* Source/NSURL.m: load resource data after setting it to force I/O
2001-12-11 Manuel Guesdon <mguesdon@orange-concept.com>

View file

@ -622,7 +622,21 @@ NSString *NSURLPartKey_query = @"query";
{
NSURLHandle *handle = [self URLHandleUsingCache: YES];
return (handle == nil) ? NO : [handle writeData: data];
if (handle == nil)
{
return NO;
}
if ([handle writeData: data] == NO)
{
return NO;
}
[self loadResourceDataNotifyingClient: self
usingCache: YES];
if ([handle resourceData] == nil)
{
return NO;
}
return YES;
}
- (id) propertyForKey: (NSString*)propertyKey