mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 01:07:22 +00:00
Make md5_file() work regardless file name case and within arbitrary
directory. svn-id: r14123
This commit is contained in:
parent
26e38321df
commit
2c687d3388
@ -239,14 +239,14 @@ void md5_finish( md5_context *ctx, uint8 digest[16] )
|
||||
PUT_UINT32( ctx->state[3], digest, 12 );
|
||||
}
|
||||
|
||||
bool md5_file( const char *name, uint8 digest[16] )
|
||||
bool md5_file( const char *name, uint8 digest[16], const char *directory )
|
||||
{
|
||||
File f;
|
||||
md5_context ctx;
|
||||
int i;
|
||||
unsigned char buf[1000];
|
||||
|
||||
f.open(name);
|
||||
f.open(name, File::kFileReadMode, directory);
|
||||
if( ! f.isOpen() )
|
||||
{
|
||||
warning( "md5_file couldn't open '%s'", name );
|
||||
|
@ -35,6 +35,6 @@ void md5_starts( md5_context *ctx );
|
||||
void md5_update( md5_context *ctx, const uint8 *input, uint32 length );
|
||||
void md5_finish( md5_context *ctx, uint8 digest[16] );
|
||||
|
||||
bool md5_file( const char *name, uint8 digest[16] );
|
||||
bool md5_file( const char *name, uint8 digest[16], const char *directory = NULL );
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user