summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2019-04-14 21:09:29 +0200
committertoonn <toonn@toonn.io>2019-04-14 21:09:29 +0200
commitcb733994217664a27a394fa501d5bf13381fe62e (patch)
tree11ffe66d4375793d7d8e40ec6c863826b27e3ec5
parent3a1f942e67d5cb23a7cd139cfcd1141e19ce5c3e (diff)
downloadranger-cb733994217664a27a394fa501d5bf13381fe62e.tar.gz
Revert "core.main: reactivate file opening with ranger directly"
Hut misunderstood an issue people were having with ranger's "open
focused on a file" feature and undeprecated the rifle-like
functionality.

The feature's still broken but I'm already redeprecating because
people'll get upset if they start using ranger as rifle and it stops
working again when I fix the feature in the near future.

This reverts commit 67e4ea4e143ed3516e5fe02607bbaf8aedf3534d.
-rw-r--r--ranger/core/main.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 6e51a023..23648677 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -96,35 +96,18 @@ def main(
 
     paths = get_paths(args)
     paths_inaccessible = []
-    paths_are_files = []
-    paths_abs = []
     for path in paths:
         try:
             path_abs = os.path.abspath(path)
         except OSError:
             paths_inaccessible += [path]
             continue
-        if os.path.isfile(path_abs):
-            paths_are_files.append(path_abs)
         if not os.access(path_abs, os.F_OK):
             paths_inaccessible += [path]
-        else:
-            paths_abs.append(path)
     if paths_inaccessible:
         print('Inaccessible paths: {0}'.format(', '.join(paths_inaccessible)),
               file=sys.stderr)
         return 1
-    if paths_are_files:
-        from ranger.ext.rifle import Rifle
-        fm = FM()
-        if not args.clean and os.path.isfile(fm.confpath('rifle.conf')):
-            rifleconf = fm.confpath('rifle.conf')
-        else:
-            rifleconf = fm.relpath('config/rifle.conf')
-        rifle = Rifle(rifleconf)
-        rifle.reload_config()
-        rifle.execute(paths_abs)
-        return 0
 
     profile = None
     exit_msg = ''