mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-20 16:20:18 +01:00
On Windows, compare paths case-insensitively for the purpose of careful_delete
Fixes #27.
This commit is contained in:
parent
d44c7d0d49
commit
b5ca69264a
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue