Page 1 of 1

Misleading message when overwriting a directory with a file

Posted: 2009-08-15, 14:42 UTC
by Mormegil
Execute the following commands to create a demonstration directory structure:

Code: Select all

mkdir from
mkdir from\dir
echo. > from\dir\filename
mkdir to
mkdir to\dir
mkdir to\dir\filename
Then, try to copy the “dir” folder from the “from” directory to the “to” directory. Obviously, there is a conflict between the file called “filename” in the source tree, and the identically-named directory in the destionation tree. However, the error message presented by TC is “Access denied on file …\to\dir\filename!” (possibly preceded by an elevation prompt with “Error: Cannot write …\to\dir\filename! Please remove the write protection!”).

TC should be able to detect this problem (trying to overwrite a directory with a file, or vice versa) and report a more specific error message.