• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Copy problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Copy problem


  • Subject: Copy problem
  • From: tridiak <email@hidden>
  • Date: Wed, 19 Dec 2012 16:38:29 +1300

Have a problem with a copying error. This occurs on 10.8, not 10.7.
This is for a custom installer. Basically copies a plugin (for DirTree) to a user-defined (or default) location.

(gdb) po plugFile
file://localhost/Users/tridiak/DTPlugInstaller.app/Contents/Resources/BunchOfFilters.bundle/
(gdb) po dest
file://localhost/Users/tridiak/DTPlugin/BunchOfFilters.bundle

============
NSFileManager* fm=[NSFileManager defaultManager];
	NSError* e=nil;
	if ([fm fileExistsAtPath:fps]) {
		if (![fm removeItemAtURL:dest error:&e]) {
			DTShowAlert(@"DirTree Plugin Installer",
				@"Could not copy plugin to location due to inability to remove an old plugin of the same name.");
			exit(0);
			}
		}
	CFShow(plugFile);
	CFShow(dest);
	if (![fm copyItemAtURL:plugFile toURL:dest error:&e]) {
		DTShowAlert(@"DirTree Plugin Installer",
			[NSString stringWithFormat:@"Could not copy plugin to location due to filing system error %@.", e.localizedDescription]);
		exit(0);
		}
=============
(gdb) po e
Error Domain=NSCocoaErrorDomain Code=4 "The file “BunchOfFilters.bundle” doesn’t exist." UserInfo=0x1723a0 {NSSourceFilePathErrorKey=/Users/tridiak/DTPlugInstaller.app/Contents/Resources/BunchOfFilters.bundle, NSUserStringVariant=(
    Copy
), NSFilePath=/Users/tridiak/DTPlugInstaller.app/Contents/Resources/BunchOfFilters.bundle, NSDestinationFilePath=/Users/tridiak/DTPlugin/BunchOfFilters.bundle, NSUnderlyingError=0x190620 "The operation couldn’t be completed. No such file or directory"}
(gdb) po [e userInfo]
{
    NSDestinationFilePath = "/Users/tridiak/DTPlugin/BunchOfFilters.bundle";
    NSFilePath = "/Users/tridiak/DTPlugInstaller.app/Contents/Resources/BunchOfFilters.bundle";
    NSSourceFilePathErrorKey = "/Users/tridiak/DTPlugInstaller.app/Contents/Resources/BunchOfFilters.bundle";
    NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
    NSUserStringVariant =     (
        Copy
    );
==================
The problem is that the source (bundle) DOES exist.
And only seems to occur on 10.8.

Any ideas

Mark
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Copy problem
      • From: Sean McBride <email@hidden>
  • Prev by Date: Re: NSURL bookmark error return
  • Next by Date: Re: Compiler can't find method declared in protocol
  • Previous by thread: Re: sandbox method to open my user manual pdf
  • Next by thread: Re: Copy problem
  • Index(es):
    • Date
    • Thread