summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-03-18 18:32:49 +0100
committernfnty <git@nfnty.se>2017-03-18 18:34:48 +0100
commita05a5b43bdc652aba2b4a0fe84f950328a70b043 (patch)
tree429faa108aa1d381cb0d33472e10636dff6094c2 /ranger
parentd842a31471e20ede89541d805a78081fe42f674b (diff)
downloadranger-a05a5b43bdc652aba2b4a0fe84f950328a70b043.tar.gz
core.main: Use `PWD` as starting path cwd if available
Prevents dereferencing symlinks on startup.

Fixes #837
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 560b4c0f..b44f75c8 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -90,7 +90,7 @@ def main(
         args.selectfile = os.path.abspath(args.selectfile)
         args.paths.insert(0, os.path.dirname(args.selectfile))
 
-    paths = args.paths or ['.']
+    paths = args.paths or [os.environ.get('PWD', os.getcwd())]
     paths_inaccessible = []
     for path in paths:
         try: