There is still a bug in NSFileManager (mingw). It is not possible to copy
files, in fact it ends in an infinite loop. I suggest to use the Win32
function CopyFile instead of reading and writing data "by hand":

- (BOOL) _copyFile: (NSString*)source
     toFile: (NSString*)destination
    handler: handler
{
#if defined(__MINGW__)
  if (CopyFile([self fileSystemRepresentationWithPath: source],
               [self fileSystemRepresentationWithPath: destination],
               NO))
    return YES;

  if (handler)
    {
      NSDictionary* errorInfo
       = [NSDictionary dictionaryWithObjectsAndKeys:
                       source, @"Path",
                       @"cannot copy file", @"Error",
                       destination, @"ToPath",
                       nil];
      return [handler fileManager: self
               shouldProceedAfterError: errorInfo];
    }
  else
      return NO;
#else /* !(__MINGW__) */
...
original code
...
#endif /* (__MINGW__) */
}


_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to