summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/actions.py4
-rw-r--r--ranger/core/main.py3
2 files changed, 2 insertions, 5 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 18302431..cd6c6afe 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -1118,10 +1118,6 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
             data['loading'] = False
             return path
 
-        if ranger.args.clean:
-            # Don't access args.cachedir in clean mode
-            return None
-
         if not os.path.exists(ranger.args.cachedir):
             os.makedirs(ranger.args.cachedir)
         cacheimg = os.path.join(ranger.args.cachedir, self.sha1_encode(path))
diff --git a/ranger/core/main.py b/ranger/core/main.py
index aefaacbc..7322a501 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -333,7 +333,8 @@ def parse_arguments():
         return path
 
     if args.clean:
-        args.cachedir = None
+        from tempfile import mkdtemp
+        args.cachedir = mkdtemp(suffix='.ranger-cache')
         args.confdir = None
         args.datadir = None
     else:
src/chat_session.h?id=d339004f55b4620b611a668b4fad0703999f8a54'>^
d2be6929 ^
3c82fb28 ^


f8de2823 ^
5792cd59 ^
5ce97728 ^
270ac035 ^

5792cd59 ^
270ac035 ^


5ce97728 ^


f8de2823 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49