--- a/userlibandfileserver/fileserver/sfat32/sl_mnt.cpp Tue Sep 14 23:56:21 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/sl_mnt.cpp Wed Sep 15 13:42:27 2010 +0300
@@ -539,7 +539,7 @@
User::Leave(KErrAccessDenied); //-- can't override RO flag
}
- (void)LocalDrive()->Finalise(ETrue);
+ (void)LocalDrive()->Finalise(ETrue);
if(aOperation == RFs::EFinal_RO)
{
@@ -550,10 +550,8 @@
return;
}
- if(LockStatus() != 0)
- {//-- can't finalise the volume if it has opened objects and not in the consistent state.
- //-- Theoretically, we can finalise the mount if we have files opened only for read, but at present,
- //-- it's impossible to detect such situation.
+ if(Locked())
+ {//-- can't finalise the volume if it has opened disk access objects, like Format or RawAccess
User::Leave(KErrInUse);
}
@@ -601,6 +599,8 @@
if(aOperation == RFs::EFinal_RO)
SetReadOnly(ETrue);
+ (void)LocalDrive()->Finalise(ETrue);
+
SetState(EFinalised);
}