NSWorkspace performFileOperation:
NSWorkspace performFileOperation:
- Subject: NSWorkspace performFileOperation:
- From: Tom Waters <email@hidden>
- Date: Sun, 24 Jun 2001 13:22:39 -0700
Has anyone else run across this? If you errantly tell NSWorkspace to
move a folder into itself, it seems to readily comply via some quantum
tunnelling effect and cause the entire folder to simply vanish!?!?
Create a folder in /tmp called "foo", and run this code... where does
the file go? and why does performFileOperation return YES and set the
tag to 0 (meaning it succeeded).
Clearly, there's an easy workaround for this, just don't attempt to do
it, but should I file a bug?
int synchtag;
BOOL b = [[NSWorkspace sharedWorkspace]
performFileOperation: NSWorkspaceMoveOperation
source: @"/tmp"
destination: @"/tmp/foo"
files: [NSArray arrayWithObject: @"foo"]
tag: &synchtag];