pCurrentElement->FileId.Unique,
&pCurrentElement->DirectoryCB->NameInformation.FileName,
pCurrentElement->DirectoryCB->ObjectInformation->FileType);
- }
- //
- // If the entry we are removing is a volume root,
- // we must remove the mount point entry as well.
- //
+ //
+ // If the entry we are removing is a volume root,
+ // we must remove the mount point entry as well.
+ // If the NameArray was constructed by checking the
+ // share name via the service, the name array can
+ // contain two volume roots in sequence without a
+ // mount point separating them.
+ //
- if ( bVolumeRoot)
- {
+ if ( bVolumeRoot &&
+ !BooleanFlagOn( NameArray->CurrentEntry->Flags, AFS_NAME_ARRAY_FLAG_ROOT_ELEMENT))
+ {
- pDirectoryCB = AFSBackupEntry( NameArray);
+ pDirectoryCB = AFSBackupEntry( NameArray);
+ }
}
+
try_exit:
NOTHING;
AFSReleaseResource( AFSGlobalRoot->ObjectInformation.Specific.Directory.DirectoryNodeHdr.TreeLock);
}
+
//
// Be sure we are starting from the correct volume
//
pVolumeCB = pDirEntry->ObjectInformation->VolumeCB;
//
+ // Init our name array
+ //
+
+ pNameArray = AFSInitNameArray( AFSGlobalRoot->DirectoryCB,
+ 0);
+
+ if( pNameArray == NULL)
+ {
+
+ AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSParseName (%08lX) Failed to initialize name array\n",
+ Irp);
+
+ try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
+ }
+
+ ntStatus = AFSInsertNextElement( pNameArray,
+ pVolumeCB->DirectoryCB);
+
+ if ( ntStatus)
+ {
+
+ AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSParseName (%08lX) Failed to insert name array element\n",
+ Irp);
+
+ try_return( ntStatus);
+ }
+
+ //
// In this case don't add back in the 'share' name since that is where we are
// starting. Just put the leading slash back in
//
pVolumeCB = AFSGlobalRoot;
//
+ // Init our name array
+ //
+
+ pNameArray = AFSInitNameArray( AFSGlobalRoot->DirectoryCB,
+ 0);
+ if( pNameArray == NULL)
+ {
+
+ AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSParseName (%08lX) Failed to initialize name array\n",
+ Irp);
+
+ try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
+ }
+
+ //
// Add back in the 'share' portion of the name since we will parse it out on return
//
//
*ParentDirectoryCB = pVolumeCB->DirectoryCB;
- }
-
- //
- // Init our name array
- //
-
- pNameArray = AFSInitNameArray( pVolumeCB->DirectoryCB,
- 0);
-
- if( pNameArray == NULL)
- {
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSParseName (%08lX) Failed to initialize name array\n",
- Irp);
- try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
}
//