From 1bb7f23f5474d7fa3ca535607e437d0622698de7 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 6 Feb 2015 21:08:59 +0100 Subject: core.loader: don't follow links when calculating size --- ranger/core/loader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ranger/core/loader.py b/ranger/core/loader.py index 17d6bf09..3ba5b128 100644 --- a/ranger/core/loader.py +++ b/ranger/core/loader.py @@ -59,6 +59,8 @@ class CopyLoader(Loadable, FileManagerAware): stack = [f.path for f in self.copy_buffer] while stack: fname = stack.pop() + if os.path.islink(fname): + continue if os.path.isdir(fname): stack.extend([join(fname, item) for item in os.listdir(fname)]) else: -- cgit 1.4.1-2-gfad0