equal
deleted
inserted
replaced
537 if(ReadOnly() && aOperation == RFs::EFinal_RW) |
537 if(ReadOnly() && aOperation == RFs::EFinal_RW) |
538 { |
538 { |
539 User::Leave(KErrAccessDenied); //-- can't override RO flag |
539 User::Leave(KErrAccessDenied); //-- can't override RO flag |
540 } |
540 } |
541 |
541 |
542 (void)LocalDrive()->Finalise(ETrue); |
542 (void)LocalDrive()->Finalise(ETrue); |
543 |
543 |
544 if(aOperation == RFs::EFinal_RO) |
544 if(aOperation == RFs::EFinal_RO) |
545 { |
545 { |
546 SetReadOnly(ETrue); |
546 SetReadOnly(ETrue); |
547 return; |
547 return; |
548 } |
548 } |
549 |
549 |
550 return; |
550 return; |
551 } |
551 } |
552 |
552 |
553 if(LockStatus() != 0) |
553 if(Locked()) |
554 {//-- can't finalise the volume if it has opened objects and not in the consistent state. |
554 {//-- can't finalise the volume if it has opened disk access objects, like Format or RawAccess |
555 //-- Theoretically, we can finalise the mount if we have files opened only for read, but at present, |
|
556 //-- it's impossible to detect such situation. |
|
557 User::Leave(KErrInUse); |
555 User::Leave(KErrInUse); |
558 } |
556 } |
559 |
557 |
560 if(State() != EInit_R && State() != EInit_W) |
558 if(State() != EInit_R && State() != EInit_W) |
561 {//-- can't finalise the mount because it can be in an inconsistent state; e.g. corrupt. |
559 {//-- can't finalise the mount because it can be in an inconsistent state; e.g. corrupt. |
598 SetVolumeCleanL(ETrue); |
596 SetVolumeCleanL(ETrue); |
599 |
597 |
600 //-- finally, put the volume into RO mode if required |
598 //-- finally, put the volume into RO mode if required |
601 if(aOperation == RFs::EFinal_RO) |
599 if(aOperation == RFs::EFinal_RO) |
602 SetReadOnly(ETrue); |
600 SetReadOnly(ETrue); |
|
601 |
|
602 (void)LocalDrive()->Finalise(ETrue); |
603 |
603 |
604 SetState(EFinalised); |
604 SetState(EFinalised); |
605 } |
605 } |
606 |
606 |
607 |
607 |