Eryk Sun <eryk...@gmail.com> added the comment:

For extra measure, you may want to normalize `prefix` prior to calculating its 
length n in gotlandmark(). Then it would be reliable to truncate it via 
`prefix[n] = '\0'` after joining with `landmark`. Or at least add a comment 
there or in the calling function, search_for_prefix(), that gotlandmark assumes 
the current value of `prefix` is a canonical, normalized path.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32457>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to