Bug 984951 - mkdir doesn't work if a regular file with the same name of the newly created directory exists
mkdir doesn't work if a regular file with the same name of the newly created ...
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-16 08:52 EDT by Renich Bon Ciric
Modified: 2013-07-16 09:31 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-16 09:31:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Renich Bon Ciric 2013-07-16 08:52:02 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):

How reproducible:
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

Actual results:
it says that the directory exists already

Expected results:
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

Additional info:
Comment 1 Kamil Dudka 2013-07-16 09:31:05 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.