mirror of https://github.com/ARMmbed/mbed-os.git
Fixing zipped makefile exports.
When zipping up projects, the makefile exporter brings every directory
supplied as --source under the same directory, even if they are in a
parent directory. There was some code that was clearing the leading
"../" components. This lead to an empty string ("") being supplied to
the "into_path" arg for "resources.add_directory". Since "" is not None,
the default behavior to place it in the same directory was not being
used. The extra "" caused a leading "/" to be added, making everything
placed a the absolute root of the filesystem ("/").
Now we check to see if the "into_path" is an empty string and ignore it
if that's the case.
pull/9967/head
parent
a0b9275ec4
commit
381223a329
|
|
@ -500,7 +500,10 @@ class Resources(object):
|
|||
start_at = index + 1
|
||||
break
|
||||
for n in range(start_at, len(components)):
|
||||
parent_name = self._sep.join([into_path] + components[:n])
|
||||
parent_name_parts = components[:n]
|
||||
if into_path:
|
||||
parent_name_parts.insert(0, into_path)
|
||||
parent_name = self._sep.join(parent_name_parts)
|
||||
parent_path = join(base_path, *components[:n])
|
||||
yield FileRef(parent_name, parent_path)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue