fix memory card temp being created as read-only
This commit is contained in:
@@ -219,10 +219,10 @@ bool MemoryCardDriver_Linux::MountAndTestWrite( UsbStorageDevice* pDevice )
|
|||||||
if( sFile[sFile.length()-1] != '/' )
|
if( sFile[sFile.length()-1] != '/' )
|
||||||
sFile += '/';
|
sFile += '/';
|
||||||
sFile += "temp";
|
sFile += "temp";
|
||||||
int fd = open( sFile, O_WRONLY|O_CREAT|O_TRUNC );
|
FILE* fp = fopen( sFile, "w" );
|
||||||
if( fd == -1 )
|
if( fp == NULL )
|
||||||
return false;
|
return false;
|
||||||
close( fd );
|
fclose( fp );
|
||||||
remove( sFile );
|
remove( sFile );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user