From b5ca69264afef5cbb44f7edda23170c6469db925 Mon Sep 17 00:00:00 2001 From: blinry Date: Wed, 24 Mar 2021 15:38:53 +0100 Subject: [PATCH] On Windows, compare paths case-insensitively for the purpose of careful_delete Fixes #27. --- scenes/helpers.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scenes/helpers.gd b/scenes/helpers.gd index 28887f1..5e5cebc 100644 --- a/scenes/helpers.gd +++ b/scenes/helpers.gd @@ -96,6 +96,9 @@ func careful_delete(path_inside): expected_prefix = "/Users/%s/Library/Application Support/Oh My Git/tmp/" % OS.get_environment("USER") elif os == "Windows": expected_prefix = "C:/Users/%s/AppData/Roaming/Oh My Git/tmp/" % OS.get_environment("USERNAME") + # Windows treats paths case-insensitively: + expected_prefix = expected_prefix.to_lower() + path_inside = path_inside.to_lower() else: helpers.crash("Unsupported OS: %s" % os)