CreateDirectory of a path name that exists on a Samba server (as a simple file) fails with the wrong code.
Steps to reproduce:
1. From a Windows machine, map a network drive to a Solaris Samba share.
2. Create a file "foo" on the share.
3. In a cmd window, do a 'md foo' when cwd is the directory containing the 'foo' file created earlier.
A subdirectory or file foo already exists.
The directory name is invalid.
I wrote a c++ program that just does the CreateDirectory and reports the error code from GetLastError. The correct code is 183 (ERROR_ALREADY_EXISTS). The code I got on 3.0.21b is 267.
I tested against a 3.0.10 Solaris Samba installation, and that correctly returned 183 as well. I also tested against a Windows file server, just to be sure that 183 is the correct response, and that worked correctly as well.
Created attachment 1737 [details]
Program (source) that creates a directory and reports error code
Created attachment 1738 [details]
Compiled binary of sambatest.cpp
Created attachment 1739 [details]
Patch I've applied.
This fixes the problem for me. It'll be in 3.0.21c. Thanks,