Microsoft KB Archive/268897

{|
 * width="100%"|

File I/O Functions Misbehave After NTFS Path Element Renamed

 * }

Q268897

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * the operating system: Microsoft Windows 2000

-

SYMPTOMS
On a Windows 2000 NTFS volume, if a folder within a file path is renamed to a truncated version of the original folder name, some file I/O operations may continue to behave as if the old path is still valid.

For example, consider the following file path:

C:\Development\Bin\App.exe

If the folder &quot;development&quot; is renamed as &quot;dev&quot;, some functions may still be able to access the file using the full original path name. That path should now be invalid, but it continues to work until the computer is restarted.

The nature of the unexpected behavior depends on the API being used. For example, GetFileAttributes will continue to return attributes for the file based on the old name. In this case, the API continues to succeed when it should fail.

On the other hand, an attempt to create a new C:\Development\Bin folder through the use of CreateDirectory will fail with &quot;ERROR_ALREADY_EXISTS&quot;. In this case, the API fails when it should succeed.

CAUSE
When a folder name is truncated, its corresponding hash value is not being properly removed from the NTFS hash table on Windows 2000.

RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, please see the following article in the Microsoft Knowledge Base:

"Q260910 How to Obtain the Latest Windows 2000 Service Pack" The English version of this fix should have the following file attributes or later:

  Date        Time    Version      Size    File name --  7/17/2000   7:23pm     i386     511,696   Ntfs.sys

STATUS
Microsoft has confirmed this to be a problem in Microsoft Windows 2000. This problem was first corrected in Windows 2000 Service Pack 2.

MORE INFORMATION
For additional information about how to install Windows 2000 and Windows 2000 hotfixes at the same time, click the article number below to view the article in the Microsoft Knowledge Base:

"Q249149 Installing Microsoft Windows 2000 and Windows 2000 Hotfixes" Additional query words:

Keywords : kbMAPI kbDSupport kbWin2000PreSP2Fix kbWin2000SP2Fix

Issue type : kbbug

Technology : kbAudDeveloper kbWin32sSearch kbWin32API