about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-08-27 19:53:44 +0200
committertoonn <toonn@toonn.io>2021-08-27 19:53:44 +0200
commitee4b970e6b80920d7468c68b3464468e9c2f54ce (patch)
treeac996cf11abdfa70d546cae7165f70b52ed826fe
parentc72830dda410523fd70db04d88412d3d00821e21 (diff)
downloadranger-ee4b970e6b80920d7468c68b3464468e9c2f54ce.tar.gz
main: Switch to open23, forcing UTF-8
-rw-r--r--ranger/core/main.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 03c9f9b6..d55f871b 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -156,11 +156,11 @@ def main(
             tabs_datapath = fm.datapath('tabs')
             if fm.settings.save_tabs_on_exit and os.path.exists(tabs_datapath) and not args.paths:
                 try:
-                    with open(tabs_datapath, 'r') as fobj:
+                    with open23(tabs_datapath, 'r') as fobj:
                         tabs_saved = fobj.read().partition('\0\0')
                         fm.start_paths += tabs_saved[0].split('\0')
                     if tabs_saved[-1]:
-                        with open(tabs_datapath, 'w') as fobj:
+                        with open23(tabs_datapath, 'w') as fobj:
                             fobj.write(tabs_saved[-1])
                     else:
                         os.remove(tabs_datapath)
@@ -443,7 +443,7 @@ def load_settings(  # pylint: disable=too-many-locals,too-many-branches,too-many
 
             if not os.path.exists(fm.confpath('plugins', '__init__.py')):
                 LOG.debug("Creating missing '__init__.py' file in plugin folder")
-                with open(fm.confpath('plugins', '__init__.py'), 'w'):
+                with open23(fm.confpath('plugins', '__init__.py'), 'w'):
                     # Create the file if it doesn't exist.
                     pass
 
760525c5549f2f6644c'>4a4a392d ^
3350c34a ^
d3a9db3a ^
d3a9db3a ^
a8fb537a ^
4a4a392d ^
































3350c34a ^
4a4a392d ^










2104d1a7 ^
b1635a5c ^
4a4a392d ^







2104d1a7 ^
8aeb85f0 ^
4a4a392d ^












ec73ed12 ^
4a4a392d ^








b1635a5c ^
4a4a392d ^




b1635a5c ^
4a4a392d ^




3350c34a ^
4a4a392d ^
ec73ed12 ^
4a4a392d ^

8aeb85f0 ^
4a4a392d ^
8aeb85f0 ^
999c529c ^
ec73ed12 ^
999c529c ^



68df24fa ^
999c529c ^
ec73ed12 ^
999c529c ^





68df24fa ^
999c529c ^
ec73ed12 ^
999c529c ^



68df24fa ^
3350c34a ^
999c529c ^
ec73ed12 ^
999c529c ^




3350c34a ^
999c529c ^
ec73ed12 ^
999c529c ^





3350c34a ^
999c529c ^
ec73ed12 ^
999c529c ^





4a4a392d ^



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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177