mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-23 02:42:37 +01:00
Add check for EACCES too
on Ubuntu EACCES will be thrown
This commit is contained in:
parent
a319782a1e
commit
d45327b1a3
@ -78,8 +78,8 @@ export async function checkDirWriteAccess(dirPath) {
|
|||||||
try {
|
try {
|
||||||
await fs.access(dirPath, fs.constants.W_OK);
|
await fs.access(dirPath, fs.constants.W_OK);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.code === 'EPERM') return false;
|
if (err.code === 'EPERM') return false; // Thrown on Mac (MAS build) when user has not yet allowed access
|
||||||
// if (err.code === 'EACCES') return false;
|
if (err.code === 'EACCES') return false; // Thrown on Linux when user doesn't have access to output dir
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user