userlibandfileserver/fileserver/sfat32/sl_mnt.cpp
branchRCL_3
changeset 41 0ffb4e86fcc9
parent 22 2f92ad2dc5db
child 42 a179b74831c9
--- a/userlibandfileserver/fileserver/sfat32/sl_mnt.cpp	Mon Jun 21 17:12:14 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/sl_mnt.cpp	Thu Jul 15 20:11:42 2010 +0300
@@ -1341,9 +1341,10 @@
     FindEntryStartL(RemoveTrailingDots(aName),KEntryAttMaskSupported,firstEntry,firstEntryPos);
     MoveToDosEntryL(firstEntryPos,firstEntry);
     TUint setAttMask=aSetAttMask&KEntryAttMaskSupported;
+	TInt oldAtt = firstEntry.Attributes();
+	TInt att = oldAtt;
     if (setAttMask|aClearAttMask)
         {
-        TInt att=firstEntry.Attributes();
         att|=setAttMask;
         att&=(~aClearAttMask);
         firstEntry.SetAttributes(att);
@@ -1352,6 +1353,8 @@
 		{
 		firstEntry.SetTime(aTime,TimeOffset());
 		}
+	else if (att == oldAtt)
+		return;					// no change - don't bother writing entry
     WriteDirEntryL(firstEntryPos,firstEntry);
     }