about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2019-04-25 13:16:26 +0200
committertoonn <toonn@toonn.io>2019-04-25 13:16:26 +0200
commit12dc544cd6d435c3846d4189c165b99345cffaa9 (patch)
treeb539b3837c5890ad99dfbacbf80ea1bf25ca03f7
parentd63de94506af1e9f1b750991d8591f3b342dcb6b (diff)
downloadranger-12dc544cd6d435c3846d4189c165b99345cffaa9.tar.gz
Fix quantifier check
`not self.quantifier` excluded `0`, which is a perfectly valid
quantifier for `chmod`.
-rwxr-xr-xranger/config/commands.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 36a6070e..cb2207ce 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -1028,8 +1028,9 @@ class chmod(Command):
     def execute(self):
         mode_str = self.rest(1)
         if not mode_str:
-            if not self.quantifier:
-                self.fm.notify("Syntax: chmod <octal number>", bad=True)
+            if self.quantifier is None:
+                self.fm.notify("Syntax: chmod <octal number> "
+                               "or specify a quantifier", bad=True)
                 return
             mode_str = str(self.quantifier)