From 13fd1f3c90ebbbe827e183a4982fb06f9c34adad Mon Sep 17 00:00:00 2001 From: Adam Kerz Date: Tue, 18 Apr 2023 16:36:34 +1000 Subject: [PATCH 1/2] use python 3.8 (Sublime4 only) --- .python-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..9b4df3b --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.8 From 155f3526ae2e50431f5f14d138b394bb105ff8d4 Mon Sep 17 00:00:00 2001 From: Adam Kerz Date: Tue, 18 Apr 2023 16:37:23 +1000 Subject: [PATCH 2/2] run realpath over the absolute path to match what git does, on Windows, at least --- sublime_github.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sublime_github.py b/sublime_github.py index b228fa7..ee4ac95 100644 --- a/sublime_github.py +++ b/sublime_github.py @@ -475,6 +475,8 @@ def done_toplevel(self, result): self.toplevel_path = result.strip() # get file path within repo absolute_path = self.view.file_name() + # resolve symlinks and subst drives (windows) because git does this when getting toplevel_path + absolute_path = os.path.realpath(absolute_path) # self.view.file_name() contains backslash on Windows instead of forwardslash absolute_path = absolute_path.replace('\\', '/') # we case-insensitive split because Windows