Skip to content

Commit 79ce48d

Browse files
Igor Zinkovskypiscisaureus
Igor Zinkovsky
authored andcommitted
fix for test-fs-chmod
1 parent fa334ef commit 79ce48d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/simple/test-fs-chmod.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ var is_windows = process.platform === 'win32';
3131

3232
// On Windows chmod is only able to manipulate read-only bit
3333
if (is_windows) {
34-
mode_async = 0400; // read-only
35-
mode_sync = 0600; // read-write
34+
mode_async = 0600; // read-write
35+
mode_sync = 0400; // read-only
3636
} else {
3737
mode_async = 0777;
3838
mode_sync = 0644;
3939
}
4040

4141
var file = path.join(common.fixturesDir, 'a.js');
4242

43-
fs.chmod(file, mode_async.toString(), function(err) {
43+
fs.chmod(file, mode_async.toString(8), function(err) {
4444
if (err) {
4545
got_error = true;
4646
} else {
@@ -68,7 +68,7 @@ fs.open(file, 'a', function(err, fd) {
6868
console.error(err.stack);
6969
return;
7070
}
71-
fs.fchmod(fd, mode_async.toString(), function(err) {
71+
fs.fchmod(fd, mode_async.toString(8), function(err) {
7272
if (err) {
7373
got_error = true;
7474
} else {

0 commit comments

Comments
 (0)