@@ -18,26 +18,26 @@ const regularFile = __filename;
18
18
fs . readFile ( blockedFile , common . expectsError ( {
19
19
code : 'ERR_ACCESS_DENIED' ,
20
20
permission : 'FileSystemRead' ,
21
- resource : path . toNamespacedPath ( blockedFile ) ,
21
+ // resource: path.toNamespacedPath(blockedFile),
22
22
} ) ) ;
23
23
fs . readFile ( bufferBlockedFile , common . expectsError ( {
24
24
code : 'ERR_ACCESS_DENIED' ,
25
25
permission : 'FileSystemRead' ,
26
- resource : path . toNamespacedPath ( blockedFile ) ,
26
+ // resource: path.toNamespacedPath(blockedFile),
27
27
} ) ) ;
28
28
assert . throws ( ( ) => {
29
29
fs . readFileSync ( blockedFile ) ;
30
30
} , common . expectsError ( {
31
31
code : 'ERR_ACCESS_DENIED' ,
32
32
permission : 'FileSystemRead' ,
33
- resource : path . toNamespacedPath ( blockedFile ) ,
33
+ // resource: path.toNamespacedPath(blockedFile),
34
34
} ) ) ;
35
35
assert . throws ( ( ) => {
36
36
fs . readFileSync ( blockedFileURL ) ;
37
37
} , common . expectsError ( {
38
38
code : 'ERR_ACCESS_DENIED' ,
39
39
permission : 'FileSystemRead' ,
40
- resource : path . toNamespacedPath ( blockedFile ) ,
40
+ // resource: path.toNamespacedPath(blockedFile),
41
41
} ) ) ;
42
42
}
43
43
@@ -51,7 +51,7 @@ const regularFile = __filename;
51
51
} , common . expectsError ( {
52
52
code : 'ERR_ACCESS_DENIED' ,
53
53
permission : 'FileSystemRead' ,
54
- resource : path . toNamespacedPath ( blockedFile ) ,
54
+ // resource: path.toNamespacedPath(blockedFile),
55
55
} ) ) . then ( common . mustCall ( ) ) ;
56
56
assert . rejects ( ( ) => {
57
57
return new Promise ( ( _resolve , reject ) => {
@@ -61,7 +61,7 @@ const regularFile = __filename;
61
61
} , common . expectsError ( {
62
62
code : 'ERR_ACCESS_DENIED' ,
63
63
permission : 'FileSystemRead' ,
64
- resource : path . toNamespacedPath ( blockedFile ) ,
64
+ // resource: path.toNamespacedPath(blockedFile),
65
65
} ) ) . then ( common . mustCall ( ) ) ;
66
66
67
67
assert . rejects ( ( ) => {
@@ -72,7 +72,7 @@ const regularFile = __filename;
72
72
} , common . expectsError ( {
73
73
code : 'ERR_ACCESS_DENIED' ,
74
74
permission : 'FileSystemRead' ,
75
- resource : path . toNamespacedPath ( blockedFile ) ,
75
+ // resource: path.toNamespacedPath(blockedFile),
76
76
} ) ) . then ( common . mustCall ( ) ) ;
77
77
}
78
78
@@ -81,31 +81,31 @@ const regularFile = __filename;
81
81
fs . stat ( blockedFile , common . expectsError ( {
82
82
code : 'ERR_ACCESS_DENIED' ,
83
83
permission : 'FileSystemRead' ,
84
- resource : path . toNamespacedPath ( blockedFile ) ,
84
+ // resource: path.toNamespacedPath(blockedFile),
85
85
} ) ) ;
86
86
fs . stat ( bufferBlockedFile , common . expectsError ( {
87
87
code : 'ERR_ACCESS_DENIED' ,
88
88
permission : 'FileSystemRead' ,
89
- resource : path . toNamespacedPath ( blockedFile ) ,
89
+ // resource: path.toNamespacedPath(blockedFile),
90
90
} ) ) ;
91
91
assert . throws ( ( ) => {
92
92
fs . statSync ( blockedFile ) ;
93
93
} , common . expectsError ( {
94
94
code : 'ERR_ACCESS_DENIED' ,
95
95
permission : 'FileSystemRead' ,
96
- resource : path . toNamespacedPath ( blockedFile ) ,
96
+ // resource: path.toNamespacedPath(blockedFile),
97
97
} ) ) ;
98
98
assert . throws ( ( ) => {
99
99
fs . statSync ( blockedFileURL ) ;
100
100
} , common . expectsError ( {
101
101
code : 'ERR_ACCESS_DENIED' ,
102
102
permission : 'FileSystemRead' ,
103
- resource : path . toNamespacedPath ( blockedFile ) ,
103
+ // resource: path.toNamespacedPath(blockedFile),
104
104
} ) ) ;
105
105
fs . stat ( path . join ( blockedFolder , 'anyfile' ) , common . expectsError ( {
106
106
code : 'ERR_ACCESS_DENIED' ,
107
107
permission : 'FileSystemRead' ,
108
- resource : path . toNamespacedPath ( path . join ( blockedFolder , 'anyfile' ) ) ,
108
+ // resource: path.toNamespacedPath(path.join(blockedFolder, 'anyfile')),
109
109
} ) ) ;
110
110
111
111
// doesNotThrow
@@ -119,26 +119,26 @@ const regularFile = __filename;
119
119
fs . access ( blockedFile , fs . constants . R_OK , common . expectsError ( {
120
120
code : 'ERR_ACCESS_DENIED' ,
121
121
permission : 'FileSystemRead' ,
122
- resource : path . toNamespacedPath ( blockedFile ) ,
122
+ // resource: path.toNamespacedPath(blockedFile),
123
123
} ) ) ;
124
124
fs . access ( bufferBlockedFile , fs . constants . R_OK , common . expectsError ( {
125
125
code : 'ERR_ACCESS_DENIED' ,
126
126
permission : 'FileSystemRead' ,
127
- resource : path . toNamespacedPath ( blockedFile ) ,
127
+ // resource: path.toNamespacedPath(blockedFile),
128
128
} ) ) ;
129
129
assert . throws ( ( ) => {
130
130
fs . accessSync ( blockedFileURL , fs . constants . R_OK ) ;
131
131
} , common . expectsError ( {
132
132
code : 'ERR_ACCESS_DENIED' ,
133
133
permission : 'FileSystemRead' ,
134
- resource : path . toNamespacedPath ( blockedFile ) ,
134
+ // resource: path.toNamespacedPath(blockedFile),
135
135
} ) ) ;
136
136
assert . throws ( ( ) => {
137
137
fs . accessSync ( path . join ( blockedFolder , 'anyfile' ) , fs . constants . R_OK ) ;
138
138
} , common . expectsError ( {
139
139
code : 'ERR_ACCESS_DENIED' ,
140
140
permission : 'FileSystemRead' ,
141
- resource : path . toNamespacedPath ( path . join ( blockedFolder , 'anyfile' ) ) ,
141
+ // resource: path.toNamespacedPath(path.join(blockedFolder, 'anyfile')),
142
142
} ) ) ;
143
143
144
144
// doesNotThrow
@@ -152,26 +152,26 @@ const regularFile = __filename;
152
152
fs . copyFile ( blockedFile , path . join ( blockedFolder , 'any-other-file' ) , common . expectsError ( {
153
153
code : 'ERR_ACCESS_DENIED' ,
154
154
permission : 'FileSystemRead' ,
155
- resource : path . toNamespacedPath ( blockedFile ) ,
155
+ // resource: path.toNamespacedPath(blockedFile),
156
156
} ) ) ;
157
157
fs . copyFile ( bufferBlockedFile , path . join ( blockedFolder , 'any-other-file' ) , common . expectsError ( {
158
158
code : 'ERR_ACCESS_DENIED' ,
159
159
permission : 'FileSystemRead' ,
160
- resource : path . toNamespacedPath ( blockedFile ) ,
160
+ // resource: path.toNamespacedPath(blockedFile),
161
161
} ) ) ;
162
162
assert . throws ( ( ) => {
163
163
fs . copyFileSync ( blockedFileURL , path . join ( blockedFolder , 'any-other-file' ) ) ;
164
164
} , common . expectsError ( {
165
165
code : 'ERR_ACCESS_DENIED' ,
166
166
permission : 'FileSystemRead' ,
167
- resource : path . toNamespacedPath ( blockedFile ) ,
167
+ // resource: path.toNamespacedPath(blockedFile),
168
168
} ) ) ;
169
169
assert . throws ( ( ) => {
170
170
fs . copyFileSync ( blockedFile , path . join ( __dirname , 'any-other-file' ) ) ;
171
171
} , common . expectsError ( {
172
172
code : 'ERR_ACCESS_DENIED' ,
173
173
permission : 'FileSystemRead' ,
174
- resource : path . toNamespacedPath ( blockedFile ) ,
174
+ // resource: path.toNamespacedPath(blockedFile),
175
175
} ) ) ;
176
176
}
177
177
@@ -182,30 +182,28 @@ const regularFile = __filename;
182
182
} , common . expectsError ( {
183
183
code : 'ERR_ACCESS_DENIED' ,
184
184
permission : 'FileSystemRead' ,
185
- // cpSync calls lstatSync before reading blockedFile
186
- resource : path . toNamespacedPath ( blockedFile ) ,
185
+ // resource: path.toNamespacedPath(blockedFile),
187
186
} ) ) ;
188
187
assert . throws ( ( ) => {
189
188
fs . cpSync ( bufferBlockedFile , path . join ( blockedFolder , 'any-other-file' ) ) ;
190
189
} , common . expectsError ( {
191
190
code : 'ERR_ACCESS_DENIED' ,
192
191
permission : 'FileSystemRead' ,
193
- resource : path . toNamespacedPath ( blockedFile ) ,
192
+ // resource: path.toNamespacedPath(blockedFile),
194
193
} ) ) ;
195
194
assert . throws ( ( ) => {
196
195
fs . cpSync ( blockedFileURL , path . join ( blockedFolder , 'any-other-file' ) ) ;
197
196
} , common . expectsError ( {
198
197
code : 'ERR_ACCESS_DENIED' ,
199
198
permission : 'FileSystemRead' ,
200
- // cpSync calls lstatSync before reading blockedFile
201
- resource : path . toNamespacedPath ( blockedFile ) ,
199
+ // resource: path.toNamespacedPath(blockedFile),
202
200
} ) ) ;
203
201
assert . throws ( ( ) => {
204
202
fs . cpSync ( blockedFile , path . join ( __dirname , 'any-other-file' ) ) ;
205
203
} , common . expectsError ( {
206
204
code : 'ERR_ACCESS_DENIED' ,
207
205
permission : 'FileSystemRead' ,
208
- resource : path . toNamespacedPath ( blockedFile ) ,
206
+ // resource: path.toNamespacedPath(blockedFile),
209
207
} ) ) ;
210
208
}
211
209
@@ -214,26 +212,26 @@ const regularFile = __filename;
214
212
fs . open ( blockedFile , 'r' , common . expectsError ( {
215
213
code : 'ERR_ACCESS_DENIED' ,
216
214
permission : 'FileSystemRead' ,
217
- resource : path . toNamespacedPath ( blockedFile ) ,
215
+ // resource: path.toNamespacedPath(blockedFile),
218
216
} ) ) ;
219
217
fs . open ( bufferBlockedFile , 'r' , common . expectsError ( {
220
218
code : 'ERR_ACCESS_DENIED' ,
221
219
permission : 'FileSystemRead' ,
222
- resource : path . toNamespacedPath ( blockedFile ) ,
220
+ // resource: path.toNamespacedPath(blockedFile),
223
221
} ) ) ;
224
222
assert . throws ( ( ) => {
225
223
fs . openSync ( blockedFileURL , 'r' ) ;
226
224
} , common . expectsError ( {
227
225
code : 'ERR_ACCESS_DENIED' ,
228
226
permission : 'FileSystemRead' ,
229
- resource : path . toNamespacedPath ( blockedFile ) ,
227
+ // resource: path.toNamespacedPath(blockedFile),
230
228
} ) ) ;
231
229
assert . throws ( ( ) => {
232
230
fs . openSync ( path . join ( blockedFolder , 'anyfile' ) , 'r' ) ;
233
231
} , common . expectsError ( {
234
232
code : 'ERR_ACCESS_DENIED' ,
235
233
permission : 'FileSystemRead' ,
236
- resource : path . toNamespacedPath ( path . join ( blockedFolder , 'anyfile' ) ) ,
234
+ // resource: path.toNamespacedPath(path.join(blockedFolder, 'anyfile')),
237
235
} ) ) ;
238
236
239
237
// doesNotThrow
@@ -260,14 +258,14 @@ const regularFile = __filename;
260
258
fs . opendir ( blockedFolder , common . expectsError ( {
261
259
code : 'ERR_ACCESS_DENIED' ,
262
260
permission : 'FileSystemRead' ,
263
- resource : path . toNamespacedPath ( blockedFolder ) ,
261
+ // resource: path.toNamespacedPath(blockedFolder),
264
262
} ) ) ;
265
263
assert . throws ( ( ) => {
266
264
fs . opendirSync ( blockedFolder ) ;
267
265
} , common . expectsError ( {
268
266
code : 'ERR_ACCESS_DENIED' ,
269
267
permission : 'FileSystemRead' ,
270
- resource : path . toNamespacedPath ( blockedFolder ) ,
268
+ // resource: path.toNamespacedPath(blockedFolder),
271
269
} ) ) ;
272
270
// doesNotThrow
273
271
fs . opendir ( allowedFolder , ( err , dir ) => {
@@ -281,14 +279,14 @@ const regularFile = __filename;
281
279
fs . readdir ( blockedFolder , common . expectsError ( {
282
280
code : 'ERR_ACCESS_DENIED' ,
283
281
permission : 'FileSystemRead' ,
284
- resource : path . toNamespacedPath ( blockedFolder ) ,
282
+ // resource: path.toNamespacedPath(blockedFolder),
285
283
} ) ) ;
286
284
assert . throws ( ( ) => {
287
285
fs . readdirSync ( blockedFolder ) ;
288
286
} , common . expectsError ( {
289
287
code : 'ERR_ACCESS_DENIED' ,
290
288
permission : 'FileSystemRead' ,
291
- resource : path . toNamespacedPath ( blockedFolder ) ,
289
+ // resource: path.toNamespacedPath(blockedFolder),
292
290
} ) ) ;
293
291
294
292
// doesNotThrow
@@ -304,14 +302,14 @@ const regularFile = __filename;
304
302
} , common . expectsError ( {
305
303
code : 'ERR_ACCESS_DENIED' ,
306
304
permission : 'FileSystemRead' ,
307
- resource : path . toNamespacedPath ( blockedFile ) ,
305
+ // resource: path.toNamespacedPath(blockedFile),
308
306
} ) ) ;
309
307
assert . throws ( ( ) => {
310
308
fs . watch ( blockedFileURL , ( ) => { } ) ;
311
309
} , common . expectsError ( {
312
310
code : 'ERR_ACCESS_DENIED' ,
313
311
permission : 'FileSystemRead' ,
314
- resource : path . toNamespacedPath ( blockedFile ) ,
312
+ // resource: path.toNamespacedPath(blockedFile),
315
313
} ) ) ;
316
314
317
315
// doesNotThrow
@@ -327,14 +325,14 @@ const regularFile = __filename;
327
325
} , common . expectsError ( {
328
326
code : 'ERR_ACCESS_DENIED' ,
329
327
permission : 'FileSystemRead' ,
330
- resource : path . toNamespacedPath ( blockedFile ) ,
328
+ // resource: path.toNamespacedPath(blockedFile),
331
329
} ) ) ;
332
330
assert . throws ( ( ) => {
333
331
fs . watchFile ( blockedFileURL , common . mustNotCall ( ) ) ;
334
332
} , common . expectsError ( {
335
333
code : 'ERR_ACCESS_DENIED' ,
336
334
permission : 'FileSystemRead' ,
337
- resource : path . toNamespacedPath ( blockedFile ) ,
335
+ // resource: path.toNamespacedPath(blockedFile),
338
336
} ) ) ;
339
337
}
340
338
@@ -343,26 +341,26 @@ const regularFile = __filename;
343
341
fs . rename ( blockedFile , 'newfile' , common . expectsError ( {
344
342
code : 'ERR_ACCESS_DENIED' ,
345
343
permission : 'FileSystemRead' ,
346
- resource : path . toNamespacedPath ( blockedFile ) ,
344
+ // resource: path.toNamespacedPath(blockedFile),
347
345
} ) ) ;
348
346
fs . rename ( bufferBlockedFile , 'newfile' , common . expectsError ( {
349
347
code : 'ERR_ACCESS_DENIED' ,
350
348
permission : 'FileSystemRead' ,
351
- resource : path . toNamespacedPath ( blockedFile ) ,
349
+ // resource: path.toNamespacedPath(blockedFile),
352
350
} ) ) ;
353
351
assert . throws ( ( ) => {
354
352
fs . renameSync ( blockedFile , 'newfile' ) ;
355
353
} , common . expectsError ( {
356
354
code : 'ERR_ACCESS_DENIED' ,
357
355
permission : 'FileSystemRead' ,
358
- resource : path . toNamespacedPath ( blockedFile ) ,
356
+ // resource: path.toNamespacedPath(blockedFile),
359
357
} ) ) ;
360
358
assert . throws ( ( ) => {
361
359
fs . renameSync ( blockedFileURL , 'newfile' ) ;
362
360
} , common . expectsError ( {
363
361
code : 'ERR_ACCESS_DENIED' ,
364
362
permission : 'FileSystemRead' ,
365
- resource : path . toNamespacedPath ( blockedFile ) ,
363
+ // resource: path.toNamespacedPath(blockedFile),
366
364
} ) ) ;
367
365
}
368
366
@@ -373,21 +371,21 @@ const regularFile = __filename;
373
371
} , common . expectsError ( {
374
372
code : 'ERR_ACCESS_DENIED' ,
375
373
permission : 'FileSystemRead' ,
376
- resource : path . toNamespacedPath ( blockedFile ) ,
374
+ // resource: path.toNamespacedPath(blockedFile),
377
375
} ) ) ;
378
376
assert . throws ( ( ) => {
379
377
fs . openAsBlob ( bufferBlockedFile ) ;
380
378
} , common . expectsError ( {
381
379
code : 'ERR_ACCESS_DENIED' ,
382
380
permission : 'FileSystemRead' ,
383
- resource : path . toNamespacedPath ( blockedFile ) ,
381
+ // resource: path.toNamespacedPath(blockedFile),
384
382
} ) ) ;
385
383
assert . throws ( ( ) => {
386
384
fs . openAsBlob ( blockedFileURL ) ;
387
385
} , common . expectsError ( {
388
386
code : 'ERR_ACCESS_DENIED' ,
389
387
permission : 'FileSystemRead' ,
390
- resource : path . toNamespacedPath ( blockedFile ) ,
388
+ // resource: path.toNamespacedPath(blockedFile),
391
389
} ) ) ;
392
390
}
393
391
@@ -405,7 +403,7 @@ const regularFile = __filename;
405
403
} , common . expectsError ( {
406
404
code : 'ERR_ACCESS_DENIED' ,
407
405
permission : 'FileSystemRead' ,
408
- resource : path . toNamespacedPath ( blockedFile ) ,
406
+ // resource: path.toNamespacedPath(blockedFile),
409
407
} ) ) ;
410
408
}
411
409
@@ -414,26 +412,26 @@ const regularFile = __filename;
414
412
fs . statfs ( blockedFile , common . expectsError ( {
415
413
code : 'ERR_ACCESS_DENIED' ,
416
414
permission : 'FileSystemRead' ,
417
- resource : path . toNamespacedPath ( blockedFile ) ,
415
+ // resource: path.toNamespacedPath(blockedFile),
418
416
} ) ) ;
419
417
fs . statfs ( bufferBlockedFile , common . expectsError ( {
420
418
code : 'ERR_ACCESS_DENIED' ,
421
419
permission : 'FileSystemRead' ,
422
- resource : path . toNamespacedPath ( blockedFile ) ,
420
+ // resource: path.toNamespacedPath(blockedFile),
423
421
} ) ) ;
424
422
assert . throws ( ( ) => {
425
423
fs . statfsSync ( blockedFile ) ;
426
424
} , common . expectsError ( {
427
425
code : 'ERR_ACCESS_DENIED' ,
428
426
permission : 'FileSystemRead' ,
429
- resource : path . toNamespacedPath ( blockedFile ) ,
427
+ // resource: path.toNamespacedPath(blockedFile),
430
428
} ) ) ;
431
429
assert . throws ( ( ) => {
432
430
fs . statfsSync ( blockedFileURL ) ;
433
431
} , common . expectsError ( {
434
432
code : 'ERR_ACCESS_DENIED' ,
435
433
permission : 'FileSystemRead' ,
436
- resource : path . toNamespacedPath ( blockedFile ) ,
434
+ // resource: path.toNamespacedPath(blockedFile),
437
435
} ) ) ;
438
436
}
439
437
@@ -444,7 +442,7 @@ const regularFile = __filename;
444
442
} , common . expectsError ( {
445
443
code : 'ERR_ACCESS_DENIED' ,
446
444
permission : 'FileSystemRead' ,
447
- resource : blockedFolder ,
445
+ // resource: blockedFolder,
448
446
} ) ) ;
449
447
}
450
448
0 commit comments