Make sure psf_open_rsrc() returns SFE_NO_ERROR when it should.

This commit is contained in:
Erik de Castro Lopo 2004-11-08 10:08:08 +00:00
parent b935e188f3
commit 4958f78317

View File

@ -134,12 +134,9 @@ psf_open_rsrc (SF_PRIVATE *psf, int open_mode)
fname [0] = '.' ;
fname [1] = '_' ;
psf->error = SFE_NO_ERROR ;
if ((psf->rsrcdes = psf_open_fd (psf->rsrcpath, open_mode)) >= 0)
{ psf->rsrclength = psf_get_filelen_fd (psf->rsrcdes) ;
if (psf->rsrclength < 100)
{ psf->error = SFE_SD2_BAD_RSRC ;
return psf->error ;
} ;
return SFE_NO_ERROR ;
} ;