MdePkg BaseLib: API PathRemoveLastItem not handle root paths properly
https://bugzilla.tianocore.org/show_bug.cgi?id=239 When the input path for API PathRemoveLastItem() is a root path like 'fs0:\', the API will return TRUE (indicating a directory or file was removed from the path) and modifies the path to 'fs0:'. In fact, there's no directory or file removed in the above case. This commit adds additional check to resolve this issue and modifies the API's description to make it more straightforward. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
@@ -1747,8 +1747,7 @@ BcdToDecimal8 (
|
||||
//
|
||||
|
||||
/**
|
||||
Removes the last directory or file entry in a path by changing the last
|
||||
L'\' to a CHAR_NULL.
|
||||
Removes the last directory or file entry in a path.
|
||||
|
||||
@param[in, out] Path The pointer to the path to modify.
|
||||
|
||||
|
Reference in New Issue
Block a user