diff options
author | 2021-07-09 16:56:35 +0100 | |
---|---|---|
committer | 2021-07-12 20:15:06 +0100 | |
commit | 407501b82c4a66f88c715e49deca8647c5fe1509 (patch) | |
tree | 2370590404f621f8db452836fb01fc4b51878aee /android/module_test.go | |
parent | ec0bd8cd9fbe50d94694d237c615e864a62a2ff7 (diff) |
Stop PathForModuleSrc from validating the paths unnecessarily
PathForModuleSrc calls validatePath in order to convert the supplied
path components into a single path. Unfortunately, that corrupts a
fully qualified module name. So, when given "//namespace:module" it
treats it as a path and replaces "//" with "/". That replacement is
done by a call to filepath.Join().
This change simply concatenates the path components together textually,
using the path separator, to avoid the corruption. That ensures that
a fully qualified module name is preserved and processed properly. If
the path components do not contain a module name then expandOneSrcPath
will call pathForModuleSrc which validates the path so it does not open
up a way to create an invalid path as the validation was unnecessary
anyway.
Bug: 193228441
Test: m nothing
Change-Id: I0bb66feac182b77ce96c8d5d5f17e28ea28d75ba
Diffstat (limited to 'android/module_test.go')
0 files changed, 0 insertions, 0 deletions