summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-03-25 10:41:23 +0100
committerhut <hut@lepus.uberspace.de>2016-03-25 10:41:23 +0100
commit7351c7a78906150b2e28b5c851a321efa3273f12 (patch)
tree9695f408de966b2fb7ac80903176c56257c812c2 /ranger
parentf9a30bac4009fa646fcbe7cd5eba12f1005b821c (diff)
parent4c6117fded0bce5844c1aa46a60c2946d50568c3 (diff)
downloadranger-7351c7a78906150b2e28b5c851a321efa3273f12.tar.gz
Merge branch 'master' of https://github.com/lverweijen/ranger
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/fsobject.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/container/fsobject.py b/ranger/container/fsobject.py
index 1daf6d70..db6772ac 100644
--- a/ranger/container/fsobject.py
+++ b/ranger/container/fsobject.py
@@ -30,7 +30,7 @@ else:
     from string import maketrans
 _unsafe_chars = '\n' + ''.join(map(chr, range(32))) + ''.join(map(chr, range(128, 256)))
 _safe_string_table = maketrans(_unsafe_chars, '?' * len(_unsafe_chars))
-_extract_number_re = re.compile(r'(\d+)')
+_extract_number_re = re.compile(r'(\d+|\D)')
 
 def safe_path(path):
     return path.translate(_safe_string_table)
@@ -134,12 +134,12 @@ class FileSystemObject(FileManagerAware, SettingsAware):
 
     @lazy_property
     def basename_natural(self):
-        return [int(s) if s.isdigit() else s \
+        return [('0', int(s)) if s.isdigit() else (s, 0) \
                 for s in _extract_number_re.split(self.relative_path)]
 
     @lazy_property
     def basename_natural_lower(self):
-        return [int(s) if s.isdigit() else s \
+        return [('0', int(s)) if s.isdigit() else (s, 0) \
                 for s in _extract_number_re.split(self.relative_path_lower)]
 
     @lazy_property