File I/O Functions Misbehave After NTFS Path Element Renamed (268897)



The information in this article applies to:

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

This article was previously published under Q268897

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 "development" is renamed as "dev", 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 "ERROR_ALREADY_EXISTS". 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, click the following article number to view the article in the Microsoft Knowledge Base:

260910 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 that this is 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:

249149 Installing Microsoft Windows 2000 and Windows 2000 Hotfixes


Modification Type:MinorLast Reviewed:9/26/2005
Keywords:kbHotfixServer kbQFE kbbug kbfix kbWin2000PreSP2Fix KB268897