Windows: File Attribute Reporting Consistency
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSFileInfo.cpp
index e1f3d99..f6a9d66 100644 (file)
@@ -846,6 +846,22 @@ AFSQueryBasicInfo( IN PIRP Irp,
 
             AFSReleaseResource( &pFcb->NPFcb->Resource);
 
+            //
+            // Its a reparse point regardless of whether the file attributes
+            // can be retrieved for the target.
+            //
+
+            if ( ulFileAttribs == FILE_ATTRIBUTE_NORMAL)
+            {
+
+                ulFileAttribs = FILE_ATTRIBUTE_REPARSE_POINT;
+            }
+            else
+            {
+
+                ulFileAttribs |= FILE_ATTRIBUTE_REPARSE_POINT;
+            }
+
             if( NT_SUCCESS( AFSRetrieveFileAttributes( pParentDirectoryCB,
                                                        DirectoryCB,
                                                        &uniParentPath,
@@ -854,17 +870,6 @@ AFSQueryBasicInfo( IN PIRP Irp,
                                                        &stFileInfo)))
             {
 
-                if ( ulFileAttribs == FILE_ATTRIBUTE_NORMAL)
-                {
-
-                    ulFileAttribs = FILE_ATTRIBUTE_REPARSE_POINT;
-                }
-                else
-                {
-
-                    ulFileAttribs |= FILE_ATTRIBUTE_REPARSE_POINT;
-                }
-
                 if ( stFileInfo.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                 {
 
@@ -967,6 +972,22 @@ AFSQueryStandardInfo( IN PIRP Irp,
 
             AFSReleaseResource( &pFcb->NPFcb->Resource);
 
+            //
+            // Its a reparse point regardless of whether or not the
+            // file attributes can be retrieved.
+            //
+
+            if ( ulFileAttribs == FILE_ATTRIBUTE_NORMAL)
+            {
+
+                ulFileAttribs = FILE_ATTRIBUTE_REPARSE_POINT;
+            }
+            else
+            {
+
+                ulFileAttribs |= FILE_ATTRIBUTE_REPARSE_POINT;
+            }
+
             if( NT_SUCCESS( AFSRetrieveFileAttributes( pParentDirectoryCB,
                                                        DirectoryCB,
                                                        &uniParentPath,
@@ -975,17 +996,6 @@ AFSQueryStandardInfo( IN PIRP Irp,
                                                        &stFileInfo)))
             {
 
-                if ( ulFileAttribs == FILE_ATTRIBUTE_NORMAL)
-                {
-
-                    ulFileAttribs = FILE_ATTRIBUTE_REPARSE_POINT;
-                }
-                else
-                {
-
-                    ulFileAttribs |= FILE_ATTRIBUTE_REPARSE_POINT;
-                }
-
                 if ( stFileInfo.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                 {
 
@@ -1478,6 +1488,22 @@ AFSQueryNetworkInfo( IN PIRP Irp,
 
             AFSReleaseResource( &pFcb->NPFcb->Resource);
 
+            //
+            // Its a reparse point regardless of whether the file attributes
+            // can be retrieved for the target.
+            //
+
+            if ( ulFileAttribs == FILE_ATTRIBUTE_NORMAL)
+            {
+
+                ulFileAttribs = FILE_ATTRIBUTE_REPARSE_POINT;
+            }
+            else
+            {
+
+                ulFileAttribs |= FILE_ATTRIBUTE_REPARSE_POINT;
+            }
+
             if( NT_SUCCESS( AFSRetrieveFileAttributes( pParentDirectoryCB,
                                                        DirectoryCB,
                                                        &uniParentPath,
@@ -1486,17 +1512,6 @@ AFSQueryNetworkInfo( IN PIRP Irp,
                                                        &stFileInfo)))
             {
 
-                if ( ulFileAttribs == FILE_ATTRIBUTE_NORMAL)
-                {
-
-                    ulFileAttribs = FILE_ATTRIBUTE_REPARSE_POINT;
-                }
-                else
-                {
-
-                    ulFileAttribs |= FILE_ATTRIBUTE_REPARSE_POINT;
-                }
-
                 if ( stFileInfo.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                 {
 
@@ -1668,6 +1683,22 @@ AFSQueryAttribTagInfo( IN PIRP Irp,
 
             AFSReleaseResource( &pFcb->NPFcb->Resource);
 
+            //
+            // Its a reparse point regardless of whether the file attributes
+            // can be retrieved for the target.
+            //
+
+            if ( ulFileAttribs == FILE_ATTRIBUTE_NORMAL)
+            {
+
+                ulFileAttribs = FILE_ATTRIBUTE_REPARSE_POINT;
+            }
+            else
+            {
+
+                ulFileAttribs |= FILE_ATTRIBUTE_REPARSE_POINT;
+            }
+
             if( NT_SUCCESS( AFSRetrieveFileAttributes( pParentDirectoryCB,
                                                        DirectoryCB,
                                                        &uniParentPath,
@@ -1676,17 +1707,6 @@ AFSQueryAttribTagInfo( IN PIRP Irp,
                                                        &stFileInfo)))
             {
 
-                if ( ulFileAttribs == FILE_ATTRIBUTE_NORMAL)
-                {
-
-                    ulFileAttribs = FILE_ATTRIBUTE_REPARSE_POINT;
-                }
-                else
-                {
-
-                    ulFileAttribs |= FILE_ATTRIBUTE_REPARSE_POINT;
-                }
-
                 if ( stFileInfo.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                 {