From 46eceee4ada511a2f964322c6e44217ebcdda5a0 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 19 Dec 2003 06:33:46 +0000 Subject: [PATCH] fix memory card temp being created as read-only --- stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp b/stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp index 6e913be5de..77fa4fd1f6 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp @@ -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;