Skip to content

Commit

Permalink
Fix folder access issue (#36)
Browse files Browse the repository at this point in the history
srcFolder access do not require write access
  • Loading branch information
sbimochan authored Jan 31, 2022
1 parent b39d240 commit 16aaf42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ZipAFolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class ZipAFolder {
throw new Error('Source and target folder must be different.');
}
try {
await fs.promises.access(srcFolder, fs.constants.R_OK | fs.constants.W_OK); //eslint-disable-line no-bitwise
await fs.promises.access(srcFolder, fs.constants.R_OK); //eslint-disable-line no-bitwise
await fs.promises.access(targetBasePath, fs.constants.R_OK | fs.constants.W_OK); //eslint-disable-line no-bitwise
} catch (e: any) {
throw new Error(`Permission error: ${e.message}`);
Expand Down

0 comments on commit 16aaf42

Please sign in to comment.