mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +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
|
@ -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…
Add table
Add a link
Reference in a new issue