about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-06-11 23:39:10 +0530
committerAndinus <andinus@nand.sh>2020-06-11 23:39:10 +0530
commit245aebe3da915afc0feafc7257f025e2e66a987f (patch)
treebdc16e833baea8da1eeec29fd3376b4f97aa6b77
parente71097613ba52a9680bce2eaa627f3659dd01038 (diff)
downloadara-245aebe3da915afc0feafc7257f025e2e66a987f.tar.gz
Fix CRITICAL error: unveil was overriden by custom sub
sub declarations are decided on compile time irrespective of
surrounding if blocks so unveil sub was getting overriden by { return
1; } everytime which means that basically unveil wasn't running at
all.

And this is why I should've written tests or maybe even add a debug
flag that would warn each time custom unveil is called.
-rwxr-xr-xara.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/ara.pl b/ara.pl
index 4df7f72..4afb9d4 100755
--- a/ara.pl
+++ b/ara.pl
@@ -10,11 +10,14 @@ use Getopt::Long qw( GetOptions );
 use JSON::MaybeXS qw( decode_json );
 
 use constant is_OpenBSD => $^O eq "openbsd";
-if (is_OpenBSD) {
-    require OpenBSD::Unveil;
-    OpenBSD::Unveil->import;
-} else {
-    sub unveil { return 1; }
+require OpenBSD::Unveil
+    if is_OpenBSD;
+sub unveil {
+    if (is_OpenBSD) {
+        return OpenBSD::Unveil::unveil(@_);
+    } else {
+        return 1;
+    }
 }
 
 # Unveil @INC.
'/akspecs/ranger/blame/doc/pydoc/ranger.gui.widgets.browsercolumn.html?h=v1.2.2&id=2ca2e862e616eba862ac80f5ee0003d1aa984a32'>^
34a60763 ^
4c13e1f2 ^






















b3556b21 ^

4c13e1f2 ^





4c13e1f2 ^









34a60763 ^

b3556b21 ^
4c13e1f2 ^
b3556b21 ^
4c13e1f2 ^































4c13e1f2 ^





















34a60763 ^
4c13e1f2 ^
34a60763 ^
4c13e1f2 ^




34a60763 ^
4c13e1f2 ^
b3556b21 ^










34a60763 ^







4c13e1f2 ^
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
178
179
180
181
182
183
184
185
186
187
188
189