From: Jeffrey Altman Date: Mon, 11 Aug 2014 05:38:54 +0000 (-0400) Subject: Windows: AFSParseName always set FileName output X-Git-Tag: upstream/1.8.0_pre1^2~607 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2f4f1e3f8619b1531838a62031e969cbf64be7dd;p=packages%2Fo%2Fopenafs.git Windows: AFSParseName always set FileName output The FileName output parameter is used by the caller even when an error occurs. In case of error it indicates that path that failed to parse. Not all of the error paths set FileName. Start AFSParseName() with FileName referring to IrpSp->FileObject->FileName. It can be updated as required later. Change-Id: I37c615aa815affec0c8f4dfef7d8c5777650c275 Reviewed-on: http://gerrit.openafs.org/11395 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp b/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp index ead1b2b17..69a61a543 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp @@ -3114,6 +3114,12 @@ AFSParseRelatedName( IN PIRP Irp, ASSERT( pRelatedFcb != NULL); + // + // On error, FileName indicates the path on which the failure occurred. + // + + *FileName = pIrpSp->FileObject->FileName; + // // No wild cards in the name // @@ -3145,8 +3151,6 @@ AFSParseRelatedName( IN PIRP Irp, pDirEntry = pRelatedCcb->DirectoryCB; - *FileName = pIrpSp->FileObject->FileName; - // // Grab the root node while checking state // @@ -3510,9 +3514,15 @@ AFSParseName( IN PIRP Irp, *ParentDirectoryCB = NULL; - // - // No wild cards in the name - // + // + // On error, FileName indicates the path on which the failure occurred + // + + *FileName = pIrpSp->FileObject->FileName; + + // + // No wild cards in the name + // uniFullName = pIrpSp->FileObject->FileName;