mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-11 12:31:28 +03:00
Modified automatic permissions for json files
This commit is contained in:
@@ -742,10 +742,10 @@ function getJSONMp4(name, customPath = null, openReadPerms = false)
|
|||||||
if (fs.existsSync(jsonPath))
|
if (fs.existsSync(jsonPath))
|
||||||
{
|
{
|
||||||
obj = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
|
obj = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
|
||||||
if (openReadPerms) fs.chmodSync(jsonPath, 0o755);
|
if (openReadPerms) fs.chmodSync(jsonPath, 0o644);
|
||||||
} else if (fs.existsSync(alternateJsonPath)) {
|
} else if (fs.existsSync(alternateJsonPath)) {
|
||||||
obj = JSON.parse(fs.readFileSync(alternateJsonPath, 'utf8'));
|
obj = JSON.parse(fs.readFileSync(alternateJsonPath, 'utf8'));
|
||||||
if (openReadPerms) fs.chmodSync(alternateJsonPath, 0o755);
|
if (openReadPerms) fs.chmodSync(alternateJsonPath, 0o644);
|
||||||
}
|
}
|
||||||
else obj = 0;
|
else obj = 0;
|
||||||
return obj;
|
return obj;
|
||||||
|
|||||||
Reference in New Issue
Block a user