fix memory card temp being created as read-only

This commit is contained in:
Chris Danford
2003-12-19 06:33:46 +00:00
parent 93b8a46399
commit 46eceee4ad
@@ -219,10 +219,10 @@ bool MemoryCardDriver_Linux::MountAndTestWrite( UsbStorageDevice* pDevice )
if( sFile[sFile.length()-1] != '/' )
sFile += '/';
sFile += "temp";
int fd = open( sFile, O_WRONLY|O_CREAT|O_TRUNC );
if( fd == -1 )
FILE* fp = fopen( sFile, "w" );
if( fp == NULL )
return false;
close( fd );
fclose( fp );
remove( sFile );
return true;