From 2f4f1e3f8619b1531838a62031e969cbf64be7dd Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 11 Aug 2014 01:38:54 -0400 Subject: [PATCH] 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 --- .../afsrdr/kernel/lib/AFSNameSupport.cpp | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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; -- 2.39.5