Fixed file source plugin so URL still exists after closing.

CQTexperiment
vspader 2009-02-28 22:03:51 -08:00
parent 6525d593f2
commit 82d9ce01bd
1 changed files with 2 additions and 5 deletions

View File

@ -13,8 +13,7 @@
- (BOOL)open:(NSURL *)url - (BOOL)open:(NSURL *)url
{ {
_url = url; [self setURL:url];
[_url retain];
_fd = fopen([[url path] UTF8String], "r"); _fd = fopen([[url path] UTF8String], "r");
@ -43,9 +42,6 @@
- (void)close - (void)close
{ {
[_url release];
_url = nil;
if (_fd) if (_fd)
{ {
fclose(_fd); fclose(_fd);
@ -78,6 +74,7 @@
- (void)dealloc { - (void)dealloc {
[self close]; [self close];
[self setURL:nil];
[super dealloc]; [super dealloc];
} }