1339 TEntryPos firstEntryPos(RootIndicator(),0); |
1339 TEntryPos firstEntryPos(RootIndicator(),0); |
1340 TFatDirEntry firstEntry; |
1340 TFatDirEntry firstEntry; |
1341 FindEntryStartL(RemoveTrailingDots(aName),KEntryAttMaskSupported,firstEntry,firstEntryPos); |
1341 FindEntryStartL(RemoveTrailingDots(aName),KEntryAttMaskSupported,firstEntry,firstEntryPos); |
1342 MoveToDosEntryL(firstEntryPos,firstEntry); |
1342 MoveToDosEntryL(firstEntryPos,firstEntry); |
1343 TUint setAttMask=aSetAttMask&KEntryAttMaskSupported; |
1343 TUint setAttMask=aSetAttMask&KEntryAttMaskSupported; |
|
1344 TInt oldAtt = firstEntry.Attributes(); |
|
1345 TInt att = oldAtt; |
1344 if (setAttMask|aClearAttMask) |
1346 if (setAttMask|aClearAttMask) |
1345 { |
1347 { |
1346 TInt att=firstEntry.Attributes(); |
|
1347 att|=setAttMask; |
1348 att|=setAttMask; |
1348 att&=(~aClearAttMask); |
1349 att&=(~aClearAttMask); |
1349 firstEntry.SetAttributes(att); |
1350 firstEntry.SetAttributes(att); |
1350 } |
1351 } |
1351 if (aSetAttMask&KEntryAttModified) |
1352 if (aSetAttMask&KEntryAttModified) |
1352 { |
1353 { |
1353 firstEntry.SetTime(aTime,TimeOffset()); |
1354 firstEntry.SetTime(aTime,TimeOffset()); |
1354 } |
1355 } |
|
1356 else if (att == oldAtt) |
|
1357 return; // no change - don't bother writing entry |
1355 WriteDirEntryL(firstEntryPos,firstEntry); |
1358 WriteDirEntryL(firstEntryPos,firstEntry); |
1356 } |
1359 } |
1357 |
1360 |
1358 //----------------------------------------------------------------------------------------- |
1361 //----------------------------------------------------------------------------------------- |
1359 |
1362 |