Fixed file source plugin so URL still exists after closing.
parent
6525d593f2
commit
82d9ce01bd
|
@ -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];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue