August 18th, 2011

Why does IFileOperation skip junctions even though I passed FOFX_NOSKIPJUNCTIONS?

The IFile­Operation::Set­Operation­Flags method accepts a number of flags to modify the file operation, among them today’s subject FOFX_NO­SKIP­JUNCTIONS. A customer reported that they couldn’t get this flag to work: Whether they set it or not, the IFile­Operation skipped over file system junctions. The term junction evolved two independent different meanings. The shell team invented the term shell namespace junction in Windows 95 to refer to a point in the shell namespace in which one type of namespace extension is grafted into another. For example, a directory of the form name.{guid} serves as the transition point between the default file system namespace and a custom namespace. Meanwhile, the file system team developed the term NTFS junction point to refer to a directory entry which links to another location. If you just hear the word junction by itself, you need to use context to determine whether it is short for shell namespace junction or NTFS junction point.

Since IFile­Operation::Set­Operation­Flags is a shell interface, the shell interpretation is more likely (and is the correct one in this case). The FOFX_NO­SKIP­JUNCTIONS flag has no effect on the behavior of the IFile­Operation interface on NTFS junction points; it modifies the behavior on shell namespace junctions.

Topics
Other

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.