about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/directory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 5acf6ca7..60387e7b 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -181,8 +181,8 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 
 				files = []
 				for name in filenames:
-					file_lstat = os.lstat(name)
 					try:
+						file_lstat = os.lstat(name)
 						if S_ISLNK(file_lstat.st_mode):
 							file_stat = os.stat(name)
 						else: