Socket
Socket
Sign inDemoInstall

fstream

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fstream - npm Package Compare versions

Comparing version 0.1.3 to 0.1.5

37

examples/deep-copy/lib/writer.js

@@ -9,3 +9,3 @@

, path = require("path")
, umask = process.umask()
, umask = process.platform === "win32" ? 0 : process.umask()
, getType = require("./get-type.js")

@@ -79,5 +79,3 @@ , Abstract = require("./abstract.js")

me._swallowErrors = true
//if (me._path.indexOf(" ") === -1) {
me._path = "\\\\?\\" + me.path.replace(/\//g, "\\")
//}
me._path = "\\\\?\\" + me.path.replace(/\//g, "\\")
}

@@ -198,3 +196,3 @@ }

// doesn't exist yet (especially if it was intended as a symlink),
// so swallow ENOENT errors here and just soldier in.
// so swallow ENOENT errors here and just soldier on.
if (er.code === "ENOENT" &&

@@ -221,3 +219,3 @@ (me.type === "Link" || me.type === "SymbolicLink") &&

var wantMode = me.props.mode
, chmod = me.props.follow || me.type === "Directory"
, chmod = me.props.follow || me.type !== "SymbolicLink"
? "chmod" : "lchmod"

@@ -228,3 +226,3 @@

todo ++
// console.error(" W chmod", wantMode.toString(8), me.basename)
// console.error(" W chmod", wantMode.toString(8), me.basename, "\r")
fs[chmod](me._path, wantMode, next(chmod))

@@ -236,13 +234,15 @@ }

if (process.platform !== "win32" &&
process.getuid &&
process.getuid() === 0 &&
fs.chown &&
process.getuid && process.getuid() === 0 &&
( typeof me.props.uid === "number" ||
typeof me.props.gid === "number")) {
if (typeof me.props.uid !== "number") me.props.uid = current.uid
if (typeof me.props.gid !== "number") me.props.gid = current.gid
if (me.props.uid !== current.uid || me.props.gid !== current.gid) {
todo ++
// console.error(" W chown", me.props.uid, me.props.gid, me.basename)
fs.chown(me._path, me.props.uid, me.props.gid, next("chown"))
typeof me.props.gid === "number" )) {
var chown = (me.props.follow || me.type !== "SymbolicLink")
? "chown" : "lchown"
if (fs[chown]) {
if (typeof me.props.uid !== "number") me.props.uid = current.uid
if (typeof me.props.gid !== "number") me.props.gid = current.gid
if (me.props.uid !== current.uid || me.props.gid !== current.gid) {
todo ++
// console.error(" W chown", me.props.uid, me.props.gid, me.basename)
fs[chown](me._path, me.props.uid, me.props.gid, next("chown"))
}
}

@@ -252,4 +252,3 @@ }

// atime, mtime.
if (fs.utimes &&
!(process.platform === "win32" && me.type === "Directory")) {
if (fs.utimes && process.platform !== "win32") {
var utimes = (me.props.follow || me.type !== "SymbolicLink")

@@ -256,0 +255,0 @@ ? "utimes" : "lutimes"

@@ -5,3 +5,3 @@ {

"description": "Advanced file system stream things",
"version": "0.1.3",
"version": "0.1.4",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -9,3 +9,3 @@

, path = require("path")
, umask = process.umask()
, umask = process.platform === "win32" ? 0 : process.umask()
, getType = require("./get-type.js")

@@ -79,5 +79,3 @@ , Abstract = require("./abstract.js")

me._swallowErrors = true
//if (me._path.indexOf(" ") === -1) {
me._path = "\\\\?\\" + me.path.replace(/\//g, "\\")
//}
me._path = "\\\\?\\" + me.path.replace(/\//g, "\\")
}

@@ -198,3 +196,3 @@ }

// doesn't exist yet (especially if it was intended as a symlink),
// so swallow ENOENT errors here and just soldier in.
// so swallow ENOENT errors here and just soldier on.
if (er.code === "ENOENT" &&

@@ -221,3 +219,3 @@ (me.type === "Link" || me.type === "SymbolicLink") &&

var wantMode = me.props.mode
, chmod = me.props.follow || me.type === "Directory"
, chmod = me.props.follow || me.type !== "SymbolicLink"
? "chmod" : "lchmod"

@@ -228,3 +226,3 @@

todo ++
// console.error(" W chmod", wantMode.toString(8), me.basename)
// console.error(" W chmod", wantMode.toString(8), me.basename, "\r")
fs[chmod](me._path, wantMode, next(chmod))

@@ -236,13 +234,15 @@ }

if (process.platform !== "win32" &&
process.getuid &&
process.getuid() === 0 &&
fs.chown &&
process.getuid && process.getuid() === 0 &&
( typeof me.props.uid === "number" ||
typeof me.props.gid === "number")) {
if (typeof me.props.uid !== "number") me.props.uid = current.uid
if (typeof me.props.gid !== "number") me.props.gid = current.gid
if (me.props.uid !== current.uid || me.props.gid !== current.gid) {
todo ++
// console.error(" W chown", me.props.uid, me.props.gid, me.basename)
fs.chown(me._path, me.props.uid, me.props.gid, next("chown"))
typeof me.props.gid === "number" )) {
var chown = (me.props.follow || me.type !== "SymbolicLink")
? "chown" : "lchown"
if (fs[chown]) {
if (typeof me.props.uid !== "number") me.props.uid = current.uid
if (typeof me.props.gid !== "number") me.props.gid = current.gid
if (me.props.uid !== current.uid || me.props.gid !== current.gid) {
todo ++
// console.error(" W chown", me.props.uid, me.props.gid, me.basename)
fs[chown](me._path, me.props.uid, me.props.gid, next("chown"))
}
}

@@ -252,4 +252,3 @@ }

// atime, mtime.
if (fs.utimes &&
!(process.platform === "win32" && me.type === "Directory")) {
if (fs.utimes && process.platform !== "win32") {
var utimes = (me.props.follow || me.type !== "SymbolicLink")

@@ -256,0 +255,0 @@ ? "utimes" : "lutimes"

@@ -5,3 +5,3 @@ {

"description": "Advanced file system stream things",
"version": "0.1.3",
"version": "0.1.5",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

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