Verify file is file in CDM folder
Make sure when reading cdm folder that a file is a file, not a folder.
This commit is contained in:
parent
886a0bd85b
commit
818d60e196
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ try {
|
|||
files.forEach(function(file) {
|
||||
file = path.join(workingDir, 'widevine', file);
|
||||
const stats = fs.statSync(file);
|
||||
if (stats.size < 1024*8) {
|
||||
if (stats.size < 1024*8 && stats.isFile()) {
|
||||
const fileContents = fs.readFileSync(file, {'encoding': 'utf8'});
|
||||
if (fileContents.includes('-BEGIN RSA PRIVATE KEY-')) {
|
||||
privateKey = fs.readFileSync(file);
|
||||
|
|
|
|||
Loading…
Reference in a new issue