Skip to content

Conversation

@kaste
Copy link

@kaste kaste commented Sep 25, 2022

Fixes #2

  • Fix off-by-one error for the line number in the popup
  • Mitigate file encoding errors (ref Cyrillic is displayed crooked #6)
  • Fix get_ancestor_distwhich was still throwing

Ref gladclef#6

Assume files are "utf-8" encoded.  This is obviously not true in all
cases but very often nowadays.
The old code still failed (raised) because you could not guarantee
that `sym_dirs[i]` is safe.

`os.path.commonpath` expects that both paths are absolute which is the
case here, and for Windows, that both paths are on the same drive.

Just check that the first char of both sides are equal and bail out
with `0` otherwise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Off by one error on the line number

1 participant