mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
Fix error copying directories.
Fix bundle for base library. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22621 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4e1daaff84
commit
48d81791bc
3 changed files with 16 additions and 9 deletions
|
@ -950,6 +950,8 @@ static NSStringEncoding defaultEncoding;
|
|||
fileType = [attrs fileType];
|
||||
if ([fileType isEqualToString: NSFileTypeDirectory] == YES)
|
||||
{
|
||||
NSMutableDictionary *mattrs;
|
||||
|
||||
/* If destination directory is a descendant of source directory copying
|
||||
isn't possible. */
|
||||
if ([[destination stringByAppendingString: @"/"]
|
||||
|
@ -960,6 +962,17 @@ static NSStringEncoding defaultEncoding;
|
|||
|
||||
[self _sendToHandler: handler willProcessPath: destination];
|
||||
|
||||
/*
|
||||
* Don't attempt to retain ownership of copy ... we want the copy
|
||||
* to be owned by the current user.
|
||||
*/
|
||||
mattrs = [attrs mutableCopy];
|
||||
[mattrs removeObjectForKey: NSFileOwnerAccountID];
|
||||
[mattrs removeObjectForKey: NSFileGroupOwnerAccountID];
|
||||
[mattrs removeObjectForKey: NSFileGroupOwnerAccountName];
|
||||
[mattrs setObject: NSUserName() forKey: NSFileOwnerAccountName];
|
||||
attrs = AUTORELEASE(mattrs);
|
||||
|
||||
if ([self createDirectoryAtPath: destination attributes: attrs] == NO)
|
||||
{
|
||||
return [self _proceedAccordingToHandler: handler
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue