Re: alias not resolving after a movePath
Re: alias not resolving after a movePath
- Subject: Re: alias not resolving after a movePath
- From: Matt Gough <email@hidden>
- Date: Fri, 11 Nov 2005 17:35:45 +0000
On 11 Nov 2005, at 16:49, Gonzalo Castro wrote:
I have an alias with its target set to origPath.
When I call
[[NSFileManager defaultManager] movePath:origPath toPath:newPath
handler:nil]
I would expect the next time I try to resolve the alias that its
target would be updated to newPath.
However, I get a -43 returned. I am using
FSResolveAliasWithMountFlags(NULL, myAlias, &myRef, &wasChanged,
kResolveAliasFileNoUI);
The movePath returns success and in fact if I look in the Finder
the move is made.
If I mimic the movePath command via the Finder, the alias resolves
correctly.
I've tried making calls to [[NSWorkspace sharedWorkspace]
noteFileSystemChanged:origPath]
after the movePath. No improvement.
Why doesn't my alias resolve the to newPath?
My guess would be that movePath isn't preserving the nodeID of the
file in your case. If that is true then it would imply that it is
really doing a copy followed by a delete, but I find that hard to
believe. Or perhaps you are moving the file across volumes (which the
alias manager would never cope with)?
Matt Gough
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden