Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
fix for test-fs-chmod
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Zinkovsky authored and piscisaureus committed Sep 9, 2011
1 parent fa334ef commit 79ce48d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/simple/test-fs-chmod.js
Expand Up @@ -31,16 +31,16 @@ var is_windows = process.platform === 'win32';

// On Windows chmod is only able to manipulate read-only bit
if (is_windows) {
mode_async = 0400; // read-only
mode_sync = 0600; // read-write
mode_async = 0600; // read-write
mode_sync = 0400; // read-only
} else {
mode_async = 0777;
mode_sync = 0644;
}

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

fs.chmod(file, mode_async.toString(), function(err) {
fs.chmod(file, mode_async.toString(8), function(err) {
if (err) {
got_error = true;
} else {
Expand Down Expand Up @@ -68,7 +68,7 @@ fs.open(file, 'a', function(err, fd) {
console.error(err.stack);
return;
}
fs.fchmod(fd, mode_async.toString(), function(err) {
fs.fchmod(fd, mode_async.toString(8), function(err) {
if (err) {
got_error = true;
} else {
Expand Down

0 comments on commit 79ce48d

Please sign in to comment.