Socket
Socket
Sign inDemoInstall

file-system

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-system - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

30

file-system.js

@@ -263,21 +263,15 @@ /**

function recurse(dirpath) {
// permission bug
try {
fs.readdirSync(dirpath).forEach(function(filename) {
var filepath = path.join(dirpath, filename);
var stats = fs.statSync(filepath);
var relative = path.relative(rootpath, filepath);
var flag = filterCb(relative);
fs.readdirSync(dirpath).forEach(function(filename) {
var filepath = path.join(dirpath, filename);
var stats = fs.statSync(filepath);
var relative = path.relative(rootpath, filepath);
var flag = filterCb(relative);
if (stats.isDirectory()) {
recurse(filepath);
if (flag) callback(filepath);
} else {
if (flag) callback(filepath, filename);
}
});
} catch(e) {
fs.chmodSync(dirpath, 511);
recurse(dirpath);
}
if (stats.isDirectory()) {
recurse(filepath);
if (flag) callback(filepath);
} else {
if (flag) callback(filepath, filename);
}
});
}

@@ -284,0 +278,0 @@

2

package.json
{
"name": "file-system",
"version": "2.1.2",
"version": "2.1.3",
"description": "Strengthen the ability of file system",

@@ -5,0 +5,0 @@ "main": "file-system.js",

@@ -39,3 +39,3 @@ var assert = require("assert");

it('copy image', function() {
it('copy image', function(done) {
var oldpath = getPath('test.png');

@@ -47,2 +47,3 @@ var newpath = getPath('var/copy-file/test.async.dest.png');

assert.equal(file.readFileSync(oldpath).length, file.readFileSync(newpath).length);
done();
}

@@ -49,0 +50,0 @@ });

@@ -73,4 +73,5 @@ var assert = require("assert");

after(function() {
file.chmodSync(getPath('var/mkdir/mode2'), 511);
file.rmdirSync(getPath('var/mkdir'));
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc