@@ -7,7 +7,6 @@ var got_error = false;
77var success_count = 0 ;
88var mode_async ;
99var mode_sync ;
10- var is_windows = common . isWindows ;
1110
1211// Need to hijack fs.open/close to make sure that things
1312// get closed once they're opened.
@@ -44,7 +43,7 @@ function closeSync() {
4443
4544
4645// On Windows chmod is only able to manipulate read-only bit
47- if ( is_windows ) {
46+ if ( common . isWindows ) {
4847 mode_async = 0o400 ; // read-only
4948 mode_sync = 0o600 ; // read-write
5049} else {
@@ -61,14 +60,14 @@ fs.chmod(file1, mode_async.toString(8), function(err) {
6160 } else {
6261 console . log ( fs . statSync ( file1 ) . mode ) ;
6362
64- if ( is_windows ) {
63+ if ( common . isWindows ) {
6564 assert . ok ( ( fs . statSync ( file1 ) . mode & 0o777 ) & mode_async ) ;
6665 } else {
6766 assert . equal ( mode_async , fs . statSync ( file1 ) . mode & 0o777 ) ;
6867 }
6968
7069 fs . chmodSync ( file1 , mode_sync ) ;
71- if ( is_windows ) {
70+ if ( common . isWindows ) {
7271 assert . ok ( ( fs . statSync ( file1 ) . mode & 0o777 ) & mode_sync ) ;
7372 } else {
7473 assert . equal ( mode_sync , fs . statSync ( file1 ) . mode & 0o777 ) ;
@@ -89,14 +88,14 @@ fs.open(file2, 'a', function(err, fd) {
8988 } else {
9089 console . log ( fs . fstatSync ( fd ) . mode ) ;
9190
92- if ( is_windows ) {
91+ if ( common . isWindows ) {
9392 assert . ok ( ( fs . fstatSync ( fd ) . mode & 0o777 ) & mode_async ) ;
9493 } else {
9594 assert . equal ( mode_async , fs . fstatSync ( fd ) . mode & 0o777 ) ;
9695 }
9796
9897 fs . fchmodSync ( fd , mode_sync ) ;
99- if ( is_windows ) {
98+ if ( common . isWindows ) {
10099 assert . ok ( ( fs . fstatSync ( fd ) . mode & 0o777 ) & mode_sync ) ;
101100 } else {
102101 assert . equal ( mode_sync , fs . fstatSync ( fd ) . mode & 0o777 ) ;
0 commit comments