Skip to content

Commit e097900

Browse files
committed
Add chmod
1 parent 73c42a8 commit e097900

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

lib/download.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ async function getPackage(){
6565
console.log('Renaming files');
6666
fs.renameSync(temp, system.typePath);
6767

68+
console.log('Applying chmod');
69+
fs.readdirSync(system.pathDir, { withFileTypes: true }).forEach(f => {
70+
if (!f.isDirectory()) {
71+
console.log(`${system.pathDir}/${f.name}`);
72+
fs.chmodSync(`${system.pathDir}/${f.name}`, '777');
73+
}
74+
});
75+
6876
console.log('FFmpeg downloaded!');
6977
}
7078

lib/system.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ module.exports.typePath = path.normalize(rootDir + '/ffmpeg/' + OS + BIT);
3939
module.exports.zipPath = path.normalize(rootDir + '/ffmpeg/' + module.exports.url.substring(module.exports.url.lastIndexOf('/')+1));
4040
module.exports.rootDir = rootDir;
4141
module.exports.path = path.normalize(module.exports.path);
42+
module.exports.pathDir = path.dirname(module.exports.path);

0 commit comments

Comments
 (0)