mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Minor fix coipying directories recursively.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22620 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
519e1dca8f
commit
4e1daaff84
2 changed files with 16 additions and 3 deletions
|
@ -5,6 +5,8 @@
|
|||
* Source/win32/NSStreamWin32.m: Use fileSystemRepresentation rather
|
||||
than cStringUsingEncoding:
|
||||
* Source/NSCalendarDate.m: Support '%T' and '%t' in description.
|
||||
* Source/NSFileManager.m: don't abort directory copy just because
|
||||
we can't set attributes of destination directory.
|
||||
* Source/NSSocketPortNameServer.m:
|
||||
* Source/NSBundle.m:
|
||||
* Source/NSProcessInfo.m:
|
||||
|
|
|
@ -2519,8 +2519,11 @@ inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
|
||||
if ([fileType isEqual: NSFileTypeDirectory])
|
||||
{
|
||||
if (![self createDirectoryAtPath: destinationFile
|
||||
attributes: attributes])
|
||||
BOOL dirOK;
|
||||
|
||||
dirOK = [self createDirectoryAtPath: destinationFile
|
||||
attributes: attributes];
|
||||
if (dirOK == NO)
|
||||
{
|
||||
if (![self _proceedAccordingToHandler: handler
|
||||
forError: _lastError
|
||||
|
@ -2530,8 +2533,16 @@ inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
{
|
||||
return NO;
|
||||
}
|
||||
/*
|
||||
* We may have managed to create the directory but not set
|
||||
* its attributes ... if so we can continue copying.
|
||||
*/
|
||||
if (![self fileExistsAtPath: destinationFile isDirectory: &dirOK])
|
||||
{
|
||||
dirOK = NO;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (dirOK == YES)
|
||||
{
|
||||
[enumerator skipDescendents];
|
||||
if (![self _copyPath: sourceFile
|
||||
|
|
Loading…
Reference in a new issue