Fix #363
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
import tarfile
|
||||
import os
|
||||
from thefuck import shells
|
||||
from thefuck.utils import for_app
|
||||
|
||||
@@ -39,4 +39,9 @@ def get_new_command(command, settings):
|
||||
def side_effect(old_cmd, command, settings):
|
||||
with tarfile.TarFile(_tar_file(old_cmd.script)[0]) as archive:
|
||||
for file in archive.getnames():
|
||||
os.remove(file)
|
||||
try:
|
||||
os.remove(file)
|
||||
except OSError:
|
||||
# does not try to remove directories as we cannot know if they
|
||||
# already existed before
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user