Socket
Socket
Sign inDemoInstall

fs-extra

Package Overview
Dependencies
17
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.0 to 0.11.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

0.11.1 / 2014-09-02
-------------------
- bugfix `copySync()` preserve file permissions [#80](https://github.com/jprichardson/node-fs-extra/pull/80)
0.11.0 / 2014-08-11

@@ -2,0 +6,0 @@ -------------------

12

lib/copy.js

@@ -16,5 +16,6 @@ "use strict"

var copyFileSync = function(srcFile, destFile) {
var bytesRead, fdr, fdw, pos;
var bytesRead, fdr, fdw, pos, stat;
fdr = fs.openSync(srcFile, 'r');
fdw = fs.openSync(destFile, 'w');
stat = fs.fstatSync(fdr);
fdw = fs.openSync(destFile, 'w', stat.mode);
bytesRead = 1;

@@ -63,3 +64,4 @@ pos = 0;

var stats = fs.lstatSync(src),
destExists = fs.exists(dest),
destFolder = path.dirname(dest),
destFolderExists = fs.exists(destFolder),
performCopy = false;

@@ -70,3 +72,3 @@ if (stats.isFile()) {

if(performCopy) {
if (!destExists) create.createFileSync(dest);
if (!destFolderExists) mkdir.mkdirsSync(destFolder);
copyFileSync(src, dest);

@@ -76,3 +78,3 @@ }

else if (stats.isDirectory()) {
if (!destExists) mkdir.mkdirsSync(dest);
if (!destFolderExists) mkdir.mkdirsSync(dest);
var contents = fs.readdirSync(src);

@@ -79,0 +81,0 @@ contents.forEach(function (content) {

{
"name": "fs-extra",
"version": "0.11.0",
"version": "0.11.1",
"description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/jprichardson/node-fs-extra",

@@ -358,2 +358,3 @@ Node.js: fs-extra

- [1] [Michael Tiller](https://github.com/xogeny)
- [1] [Sylvain Cleymans](https://github.com/Ackar)
- `<your name here>`

@@ -360,0 +361,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc