mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
Fix race condition in chmod test
This commit is contained in:
parent
6adc87e3eb
commit
50d6593f6a
1 changed files with 4 additions and 4 deletions
|
@ -31,10 +31,10 @@ if (isNotWindows) {
|
|||
const filename = tempDir + "/test.txt";
|
||||
deno.writeFileSync(filename, data, 0o666);
|
||||
const symlinkName = tempDir + "/test_symlink.txt";
|
||||
deno.symlink(filename, symlinkName);
|
||||
deno.symlinkSync(filename, symlinkName);
|
||||
|
||||
let symlinkInfo = deno.lstatSync(symlinkName);
|
||||
const symlinkMode = symlinkInfo.mode & 0o777; // plaform dependent
|
||||
const symlinkMode = symlinkInfo.mode & 0o777; // platform dependent
|
||||
|
||||
deno.chmodSync(symlinkName, 0o777);
|
||||
|
||||
|
@ -96,10 +96,10 @@ if (isNotWindows) {
|
|||
const filename = tempDir + "/test.txt";
|
||||
deno.writeFileSync(filename, data, 0o666);
|
||||
const symlinkName = tempDir + "/test_symlink.txt";
|
||||
deno.symlink(filename, symlinkName);
|
||||
deno.symlinkSync(filename, symlinkName);
|
||||
|
||||
let symlinkInfo = deno.lstatSync(symlinkName);
|
||||
const symlinkMode = symlinkInfo.mode & 0o777; // plaform dependent
|
||||
const symlinkMode = symlinkInfo.mode & 0o777; // platform dependent
|
||||
|
||||
await deno.chmod(symlinkName, 0o777);
|
||||
|
||||
|
|
Loading…
Reference in a new issue