Set dates on copy ... it turns our OSX does not behave like Posix

This commit is contained in:
Richard Frith-Macdonald 2020-07-31 15:29:02 +01:00
parent 689932aa10
commit 62c68d3cab

View file

@ -1282,8 +1282,8 @@ static NSStringEncoding defaultEncoding;
/* Don't attempt to retain ownership of copy ... we want the copy
* to be owned by the current user.
* Also, the new copy should not have the creation/modification
* date of the original.
* However, the new copy should have the creation/modification date
* of the original (unlike Posix semantics).
*/
attrs = AUTORELEASE([attrs mutableCopy]);
[(NSMutableDictionary*)attrs removeObjectForKey: NSFileOwnerAccountID];
@ -1292,9 +1292,6 @@ static NSStringEncoding defaultEncoding;
[(NSMutableDictionary*)attrs setObject: NSUserName()
forKey: NSFileOwnerAccountName];
[(NSMutableDictionary*)attrs removeObjectForKey: NSFileCreationDate];
[(NSMutableDictionary*)attrs removeObjectForKey: NSFileModificationDate];
if ([fileType isEqualToString: NSFileTypeDirectory] == YES)
{