mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-19 09:08:47 +00:00
Include root (start with /) case
This commit is contained in:
parent
b65e3a9aad
commit
d1dbbb57d9
@ -37,7 +37,11 @@ def get_new_command(command):
|
|||||||
dest = command.script_parts[1].split(os.sep)
|
dest = command.script_parts[1].split(os.sep)
|
||||||
if dest[-1] == '':
|
if dest[-1] == '':
|
||||||
dest = dest[:-1]
|
dest = dest[:-1]
|
||||||
if six.PY2:
|
|
||||||
|
if dest[0] == '':
|
||||||
|
cwd = os.sep
|
||||||
|
dest = dest[1:]
|
||||||
|
elif six.PY2:
|
||||||
cwd = os.getcwdu()
|
cwd = os.getcwdu()
|
||||||
else:
|
else:
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user