| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9c272ab commit 3c8a33e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,7 +54,9 @@ | |||
| 54 | 54 | ) | |
| 55 | 55 | from git.compat import ( | |
| 56 | 56 | text_type, | |
| 57 | - defenc | ||
| 57 | + force_text, | ||
| 58 | + defenc, | ||
| 59 | + PY3 | ||
| 58 | 60 | ) | |
| 59 | 61 | ||
| 60 | 62 | import os | |
@@ -625,7 +627,12 @@ def _get_untracked_files(self, **kwargs): | |||
| 625 | 627 | filename = line[len(prefix):].rstrip('\n') | |
| 626 | 628 | # Special characters are escaped | |
| 627 | 629 | if filename[0] == filename[-1] == '"': | |
| 628 | - filename = filename[1:-1].decode('string_escape').decode(defenc) | ||
| 630 | + filename = filename[1:-1] | ||
| 631 | + if PY3: | ||
| 632 | + # WHATEVER ... it's a mess, but works for me | ||
| 633 | + filename = filename.encode('ascii').decode('unicode_escape').encode('latin1').decode(defenc) | ||
| 634 | + else: | ||
| 635 | + filename = filename.decode('string_escape').decode(defenc) | ||
| 629 | 636 | untracked_files.append(filename) | |
| 630 | 637 | finalize_process(proc) | |
| 631 | 638 | return untracked_files | |
| Back | FazBrowse Home | New Git URL |
0 commit comments