userlibandfileserver/fileserver/sfile/sf_nbs.cpp
branchRCL_3
changeset 41 0ffb4e86fcc9
parent 28 5b5d147c7838
equal deleted inserted replaced
39:2bb754abd467 41:0ffb4e86fcc9
   223 	TEntry t; 
   223 	TEntry t; 
   224 	TPtrC filePath = aRequest->Src().FullName().Mid(2);
   224 	TPtrC filePath = aRequest->Src().FullName().Mid(2);
   225 	TInt r=aRequest->Drive()->Entry(filePath,t);
   225 	TInt r=aRequest->Drive()->Entry(filePath,t);
   226 	if (r!=KErrNone)
   226 	if (r!=KErrNone)
   227 		return(r);
   227 		return(r);
   228 
       
   229 	// If the file is open, get the file size from the CFileCB object as there may be cached data
       
   230 	CFileCB* file;
       
   231 	aRequest->Drive()->IsFileOpen(filePath, file);
       
   232 	if (file)
       
   233 		t.SetFileSize(file->CachedSize64());
       
   234 
   228 
   235 	TPckgC<TEntry> p(t);
   229 	TPckgC<TEntry> p(t);
   236 	aRequest->WriteL(KMsgPtr1,p);
   230 	aRequest->WriteL(KMsgPtr1,p);
   237 	return(KErrNone);
   231 	return(KErrNone);
   238 	}
   232 	}