diff -r 42814f902fe6 -r 38571fd2a704 calendarui/commonutils/src/calenattachmentinfo.cpp --- a/calendarui/commonutils/src/calenattachmentinfo.cpp Fri Feb 19 22:49:53 2010 +0200 +++ b/calendarui/commonutils/src/calenattachmentinfo.cpp Fri Mar 12 15:42:35 2010 +0200 @@ -67,6 +67,10 @@ TRACE_ENTRY_POINT; TRACE_EXIT_POINT; delete iIcon; + if(isSetFileHandle) + { + iFile.Close(); + } } // ---------------------------------------------------------------------------- @@ -292,6 +296,46 @@ return iSystemFileName; } +// ---------------------------------------------------------------------------- +// CCalenAttachmentInfo::SetFileHandle +// +//Sets the file handle +// ---------------------------------------------------------------------------- +// +void CCalenAttachmentInfo::SetFileHandle(RFile& aFile) + { + TRACE_ENTRY_POINT; + iFile.Duplicate(aFile); + isSetFileHandle = ETrue; + TRACE_EXIT_POINT; + } + +// ---------------------------------------------------------------------------- +// CCalenAttachmentInfo::FileHandle +// +//Gets the file handle. +// ---------------------------------------------------------------------------- +// +void CCalenAttachmentInfo::FileHandle( RFile& aFile ) + { + TRACE_ENTRY_POINT; + + aFile.Duplicate( iFile ); + TRACE_EXIT_POINT; + } + +// ---------------------------------------------------------------------------- +// CCalenAttachmentInfo::IsFileHandleSet +// ---------------------------------------------------------------------------- +// +TBool CCalenAttachmentInfo::IsFileHandleSet() + { + TRACE_ENTRY_POINT; + TRACE_EXIT_POINT; + + return isSetFileHandle; + } + //end of file