Red Hat Bugzilla – Bug 984951
mkdir doesn't work if a regular file with the same name of the newly created directory exists
Last modified: 2013-07-16 09:31:05 EDT
Description of problem:
You can't create a directory with the same name of a file.
Version-Release number of selected component (if applicable):
create a file named "test" and, then, try creating a directory with the same name.
Steps to Reproduce:
1. cd /tmp
2. touch test
3. mkdir test
it says that the directory exists already
the two files should be differentiated by their mime and not compared only by name or whatever is happening.
Actually, a dir and a file with the same name should be allowed to coexists in the same level
The name can either map to an inode representing a directory, or an inode representing a regular file, but not both of them at a time. This is by design of any (useful) file system we support.