From 2a64495f966991585dc7e4a35d48f8801fc556f8 Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 9 Jan 2010 00:34:27 +0100 Subject: actions: fixed deletion of symlinks to directories --- TODO | 2 +- ranger/actions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index cc3b9c85..f5e5536f 100644 --- a/TODO +++ b/TODO @@ -34,7 +34,7 @@ Bugs (X) #19 10/01/01 resizing after pressing g (X) #23 10/01/04 stop dir loading with ^C -> wont load anymore (X) #25 10/01/06 directories sometimes dont reload correctly - ( ) #26 10/01/06 :delete on symlinks of directories fails + (X) #26 10/01/06 :delete on symlinks of directories fails ( ) #31 10/01/06 ^C breaks cd-after-exit diff --git a/ranger/actions.py b/ranger/actions.py index 42756379..7e1c1dd3 100644 --- a/ranger/actions.py +++ b/ranger/actions.py @@ -451,7 +451,7 @@ class Actions(EnvironmentAware, SettingsAware): self.env.copy -= selected if selected: for f in selected: - if os.path.isdir(f.path): + if os.path.isdir(f.path) and not os.path.islink(f.path): try: shutil.rmtree(f.path) except OSError as err: -- cgit 1.4.1-2-gfad0