On 25/11/16 13:28, Maciej Borzęcki wrote:
> On Fri, Nov 25, 2016 at 11:15 AM, Kristian Amlie
>> + # Disallow '..', because doing so could be quite disastrous
>> + # (we will delete the directory).
>> + remaining = path
>> + while True:
>> + (head, tail) = os.path.split(remaining)
>> + if tail == '..':
>> + msger.error("'..' not allowed: --exclude-path=%s" %
>> orig_path)
>> + elif head == "":
>> + break
>> + remaining = head
>
> Why not do this instead?
>
> if '..' in path:
> msger.error("'..' not allowed: --exclude-path=%s" % orig_path)
>
Because '..' can be part of a longer file name. Not overly likely, but
not impossible either.
--
Kristian
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core