Ref: 10710049
Title: File is deleted when attempting to copy to same folder (Mac)
Date:  7/7/88

Copyright 3Com Corporation, 1991.  All rights reserved.

Yes, this is a known "feature", and is discussed in the release
notes that came with the 1.2.1.  The problem lies with how the
Mac file system does file copies - all we can do is warn people
about it.

Here is a problem that was discovered in 3+ for Mac 1.2:

1) Create a shared folder with a DOS path (for example the shared folder
name APPS with path D:\APPS).

2) Create another shared folder with the same DOS path (for example the
shared folder name APPSADMN with path D:\APPS).

3) Link the two shared folders.

4) Copy a file from APPS to APPSADMN (APPSADMN must have write access).

5) The Mac will ask you if wou want to "Replace items with the same
names with the selected items ?".  If you answer yes, the Mac will
tell you that the file/folder was not found and THE FILE HAS ACTUALLY
DISAPPEARED !

Other symptoms can also appear, such as not being able to unshare the folder
even if it's empty and unlinked.

Part of the problem is in the way the Apple software works.  The Finder
thinks that the file you are copying is a different file than the one in
the source directory.  When you acknowledge the alert about overwriting
the target file, the Finder deletes the target file, then attempts to open
the source folder file and discovers that the file is gone (it just deleted it).

We have discussed possible solutions to this particular problem.  We
could refuse to link the user to shared directories if they are already
linked to a shared directory that would provide access to the same
space.  We could just warn them.  We could give them read only access to
the second link.

One thing we cannot do because of the way the Finder
operates is detect that a copy of a file onto itself is taking place.
Our file management software only sees deletes, opens, and reads as
separate actions that bear no discernable relationship to each other.

h3;PC Workstation
Note:  The problem or a variant of it can also be reproduced on the PC
if the file you copy is big enough.
